Whether your closet doors fold, slide or simply open and close on hinges, you should make repairs, if needed, before you go about refinishing them.
Bi-fold closet doors are constructed of two separate pieces connected by hinges; each bi-fold door is anchored by spring-mounted pins on the top and bottom of one side of the door depending on which side the closet opens on. The other side of the door slides on a track along the top of the closet, and is connected by a roller pin. Often, over time, the doors can become misaligned and pop out of the track. When this happens, it is probably because the top anchor has moved just a bit — enough so that the door goes out of alignment. This usually requires just a readjustment but can also mean it's time for replacement of the parts. Open the door all the way and check the top anchor pin to see if its sliding bracket has loosened and moved out of position. If it has, move it back so that the edge of the door is perpendicular with the jamb and retighten the bracket in that position. You may need to remove the door to evaluate the situation. To do this, open the door all the way and lift up with both hands. The top pivot anchor will depress (because it is spring-loaded) and the bottom pin will slip out of its bracket. Then pull the door out toward you. The roller should snap out easily. You can re-hang the door by following this procedure in reverse and then depress and snap the roller pin into the track. In most cases, the track will not need to be replaced unless it has become warped or otherwise damaged. You can find all the needed replacement parts, including full kits at your local True Value hardware store. Follow the manufacturer's directions for proper installation.
If your door has slats or louvers, these are susceptible to accidental breakage. You don't have to replace the whole door though; you can simply repair the slats. Just sand away the broken end or ends of the slat that connect to the rest of the closet door using fine-grit sandpaper, making sure to smooth away any splinters and rough edges. Apply some wood glue to the ends of the slat and then push it back in place and hold it for a minute or two until the glue begins to harden and adheres. Then let the glue dry completely, as recommended by the manufacturer.
Sliding closet doors work similarly to folding doors and commonly become misaligned and stuck, or skip off of their tracks. If you notice a sticking door or if it has come off of the track, determine the source of the problem and try to fix it before the problem gets worse. Don't force a sliding door. One typical cause is a dirty or obstructed track. Remove dust, dirt and debris from the track using a vacuum or hand vac and a damp rag. Often screws can become loose and begin to pop up which obstruct the track. Simply tighten the screws with a screwdriver. If the door sticks or is hard to slide, try tightening the track or check to see if the rollers have worn or been otherwise damaged. Use a lubricant such as WD-40 or 3-in-1 multipurpose oil on parts that work but require a little assistance to move. Lightly hammer out any dents along the track that might cause the door to stick. Doors often can stick due to a misaligned floor guide. If it has moved out of place, fix it by putting it back in the right position or replace it, if needed. As with bi-fold closet doors, sliding door hardware and replacement parts can be purchased separately and in kits.
A standard door, properly hung, should have a gap between the door and the frame of about the width of a nickel all the way around when closed. If the frame goes out of square, or wasn't hung correctly, the door can begin to stick. Find out where the door is touching the frame making it stick. If it gets stuck at the top, you can trim the top of the door by removing it and trimming it with a circular saw. In some cases, you might be able to sand it down with a belt sander. This comes in handy, as you want to trim off just enough so that it stops sticking. You can use this same technique to fix the bottom of the door if the bottom is where the door is sticking, or dragging on the floor. If the door sticks on the top or bottom edge, opposite of the hinge, check the hinge to see if its screws just need to be tightened. If it sticks on the hinge side and the screws are tight, it might be that the hinge mortises are set too deep or the hinge is bent. If the hinge is bent, replace it. If the hinge is set too deep you can remove the hinge screws, add a piece of thin cardboard behind the leaf of the hinge and then replace the screws. Tighten all hardware on the door's lockset if it is loose; replace a broken or malfunctioning lockset. Nicks, dents and scratches on wood doors can be filled and covered up with wood putty.