Medium-density fiberboard (MDF) is a useful building material, but its generic tan surface isn't particularly attractive and usually needs to be painted. Even if someone found its bland appearance appealing enough to stain and coat with a clear finish, you probably wouldn't be able to sand out the stain well enough to apply a new one. Since refinishing MDF usually means repainting it, the preparation is less complicated. After you've made any necessary repairs, surface-sanding the old paint or finish is usually all you need to do to prepare MDF for new paint.
Unscrew the door hinges from the cabinet, using a screwdriver, and take down the doors. Unscrew and remove the hinges and handles from all the doors, and put the hardware in a safe place. Be sure to mark each door so you know where it goes.
Patch large holes and gouges with patching compound. Mix a little powdered compound with water until you have a stiff mixture, and then spread it in the holes, using a putty knife. Don't fill the holes completely --- you'll be able to finish them off later with drywall joint compound. Form the compound into a small ball and use it like putty to patch chipped edges and corners of the cabinet and doors. Work quickly. Patching compound sets in 10 to 20 minutes.
Fill smaller holes as well as the ones you have patched with drywall joint compound. Spread the compound with a putty knife and scrape it flat, leaving a flat surface. Spread compound on the edges of the cabinet and doors with your finger. The edges are more porous than the rest of the surface, and the joint compound will allow them to take paint more evenly. Let the compound dry overnight.
Sand the cabinet and doors with an orbital sander fitted with 120-grit sandpaper. The object isn't to remove the paint, but to dull it and feather any edges of chipping and peeling paint into the surrounding surface. Sand the edges by hand to form the joint compound into a smooth, rounded surface.
Mask off the area around the cabinets with newspaper and masking tape, and line up the cabinet doors vertically along a wall, placing newspaper behind and underneath them.
Spread oil-based primer on all the areas you have patched, as well as on any where the paint has chipped or peeled off the MDF. Let the primer dry for four to six hours.
Paint the cabinets and doors with oil-based enamel or with an opaque urethane finish. Paint vertical surfaces from the top down, and paint horizontal surfaces last. Sand the cabinets and doors with 220-grit sandpaper, and then apply another coat after the paint has dried, if necessary.
Replace the door hardware and rehang the doors after the final coat has completely dried.
Leave the cabinet doors open for a few days to give the paint time to fully cure. Painting the cabinets with a paintbrush will leave brush marks. If you want to avoid this, spray the cabinets with opaque lacquer or urethane, using an air sprayer.