Unscrew any screws in the door and remove the handle and other hardware. Unscrew the hinges and take the door down.
Dip a finger in drywall compound and apply the material to the edges of the door. The edges of a thermofoil door are much more porous and will absorb a great deal of the finish coating, unless you apply drywall compound.
Wait for the drywall compound to dry, and then sand it down.
Sand the rest of the door with 120-grit or 150-grit sandpaper. This allows the primer coat to adhere to the door more effectively. Sand the thermofoil door lightly in the direction of the grain.
Dampen a clean cloth with mineral spirits. Wipe away the dust with the cloth.
Dip a clean paintbrush in a solvent-based primer. Apply the primer to the door with even strokes, adding more primer as needed.
Wait for the primer to dry completely.
Dip a clean paintbrush in your desired paint finish. You may use a water-based paint for Thermofoil doors, so long as you used a solvent-based primer. Apply the paint evenly to the surface. Allow the door to dry completely before reassembling it.