Inspect the surface for cracking, peeling, flaking, loose paint. Depending on the severity of the damage you may choose to employ one or more the methods described here to prepare the surface for a new coating.
This is a traditional effective approach for most flat surfaces from plaster and wallboard to wood and ferrous metal. Use shaped scrapers like triangle or oval shapes to get into corners and on rounded profiles. Take care not to gouge, score or otherwise harm the surface. Feather sand all rough edges with a medium, then fine grit garnet sand paper.
Use a stiff wire brush, being careful not to damage the substrate. Once all loose paint has been removed sand the surface with a medium then fine grit garnet sand paper.
If the surface is just flaking slightly you can simply sand the are with progressively finer grit garnet papers starting with coarse, then medium, then fine.
Choose a paint remover that is recommended for the coating and substrate you're preparing. Apply a heavy coat of the remover with an old or a low-end natural bristle paint brush since the remover will likely ruin the brush. Give the product plenty of time to work as recommended by the manufacturer, usually 15 to 20 minutes or longer depending on the thickness of the old paint. Carefully remove the softened paint using a putty knife or wooden blade and scrape the material into doubled paper grocery bags inside a cardboard carton. Reapply more stripper if needed and then clean the surface with wadded up paper toweling, newspaper or a commercial pad designed for this purpose. Before using these products, clear the area of children and pets. Cover floors and steps and remove plants, rugs and furniture. Dispose of all refuse after the job carefully following manufacturer instructions. Wear goggles or face mask for eye protection; use chemical resistant gloves, long sleeve shirt and pants to protect the skin; and protect breathing with a respirator designed for use with chemical solvents. There are low odor alternatives to the strong solvent removers, but they may take several hours to accomplish the same job. Once the remover has done it's work, sand the surface thoroughly with fine garnet paper and dust before applying primer, stain or varnish.