The brake rotors on a car or truck are turned on a lathe. Few of us have a lathe like this in our garage, but lots of shops have this piece of gear. Additionally, there are "jobbers" who have a lathe in a van that can come to your place. (The mobile brake specialist also has pads, shoes and the like, and can turn drums as well as rotors.) Note that a mobile service may or may not do the work of removing the rotors and then replacing all the parts to complete your brake job. There are also shops that have a lathe that will turn a rotor without the necessity of removing it from the vehicle, by the way.
In some cases of advanced wear, the brake rotors will end up too "thin" after being turned, and cannot be used again. In this case, new (or reconditioned) rotors will have to be installed on the vehicle. A shop has a special caliper to determine if the rotor will still have enough "meat" on it (still be thick enough) to be resurfaced and trued, and then used once more. Let's touch on the lathe and then wrap up.
A lathe is a device that turns a workpiece, in this case, the brake rotor, and a tool rest of some kind holds a sharp tool against the turning rotor to remove material. The lathe is used to remove the outer layer of material on the rotor to provide a fresh surface for the brake pads to grip on. The rotor is also trued in this process, and the finished rotor will be very flat on a plane perpendicular to the axis of rotation.
Unless you're really good with a wrench, it is best to let a professional shop do this work. If you mess up a tune up, your car won't run well (if at all). But if you mess up a brake job, you might easily find yourself in an accident. Think this through and get some estimates before you consider pulling your rotors and hauling them in to get turned. You may not be able to get things back together correctly to finish the job.