Like rotors, brake drums can sometimes be machined to restore a good braking surface - but only within limits. Here is when you can machine a brake drum and when you cannot.
Machining removes grooves and out-of-round
A brake lathe can cut a light layer off the inside of the drum to remove grooves, glazing, and out-of-round that cause pulsation - see what is a brake drum. This restores a smooth, true surface for the shoes to grip; see how drum brakes work.
The maximum diameter limit
Every drum has a maximum inside diameter cast or stamped into it. Machining enlarges the diameter, so a drum that is already near the max cannot be cut - doing so leaves it too thin to handle heat and pressure safely; see resurface vs replace.
When to replace instead
Replace a drum that is at or past max diameter, cracked, heat-checked, or deeply scored beyond what a light cut removes. Drums are inexpensive, so replacement is often the practical choice over machining a marginal one.
Do it in pairs
Machine or replace drums as an axle pair for even braking, and fit fresh shoes at the same time; see what is a brake shoe. Keep the front discs sharp with quality pads and hardware.