Formica is not a material that you can just slap a coat of paint on. Because it is non-porous and smooth, a coat of paint will normally be hard to evenly spread and would just peel off when dry. There are steps you can take to avoid this disaster. With some effort you can prepare your Formica cabinets so that they are ready for painting. It's not hard, but it is time-consuming, though the results are well worth it if you can't replace your old Formica cabinets.
Remove your cabinet doors and remove all of the hardware. This will make them easier to work with. If you are planning to replace or change any of the hardware that will require new holes to be drilled, fill the existing holes with spackle.
Clean each door thoroughly with a mixture of ammonia (1 cup) and warm water (1 gallon). This will remove any grease or build-up. Allow the doors to dry.
Using an electric sander, begin sanding the doors with fine sand paper. If you don't have an electric sander, you can do it with elbow grease. However it will take much longer and your arm will get quite a workout. Make sure to sand all the surfaces, including the edges, evenly and thoroughly until it feels slightly rough and grainy. Any spot not sanded well enough will not take paint well, and the paint will easily scratch off with use.
Wipe down the cabinets thoroughly with a rag and remove all traces of dust. If there are any areas on the cabinet that you are not painting, cover them with painter's tape.
Wash and sand the edges and sides of the cabinet frames that you want to paint as well, the same way you did the doors. Cover any areas around the cabinets that you don't want painted with a painter's tape, such as where it meets the wall or ceiling.
Apply two to three coatings of a good, thick primer (like Kilz) to all the surfaces you want to paint. As you're priming, check to see if there are any areas that are not accepting the primer. These areas will look like the primer is smearing onto a slick surface rather than absorbing into it. This means the spot was not sanded well.
If you have any spots that require more sanding, wipe away the primer and re-sand them. Clean away the dust and prime them again.
Allow each coating of primer to dry between applications. Allow the final coating to dry for 12 to 24 hours.
Apply your paint, which will now adhere to the coatings of primer. You will probably need about two coats because much of it will soak into the primer, but this will largely depend on the quality of your paint.
Allow the paint to dry. If you used painter's tape that needs removing, use a razor or box cutter to run along the edges of where the paint is supposed to stop. That way, when you pull the tape off, if any thick drips of paint overlapped it, it won't peel the paint off with it.
Replace your hardware, drilling new holes if you need to, and re-attach your cabinet doors.