Medium-density fibercore, also known as MDF, is a composite building material. It consists of tightly packed wood particles glued together under extreme pressure. It has a hardwood veneer on two sides and is used in cabinet and furniture making. When the sides of the MDF are exposed, such as when the MDF is used for cabinet doors, they look like grey or brown sandpaper. You can sand and finish that rough edge without any special tools.
Sand the sides of the MDF with 100 grit sandpaper on a hand block. Sand up and down the sides using short strokes until the particles are blended together and there are no small pits.
Tip the block slightly and sand off the sharp edge on both sides where the veneer is glued onto the MDF. Round the edge over so that it is smooth to the touch.
Sand the MDF edge again with 180 grit sandpaper. Hold the sandpaper in your fingers; don't use the hand block. Sand back and forth over the edge until it will reflect light.
Use a cloth to apply stain to the edge. Let it dry according to the directions on the can.
Spray a light coat of lacquer on the edge. Wait 30 minutes for the lacquer to dry. Sand the edge again with 180 grit sandpaper until the edge is covered in fine white powder.
Spray another coat of lacquer on the edge to finish.
If you are sanding the edges of multiple doors, you can use an orbital sander to expedite the job.
Always wear breathing and eye protection when working with wood.