How do I prepare exterior concrete walls for painting?
If by cement you mean stucco (which is essentially cement) you need to strip off the layer of paint that is peeling. That's typically done with sandblasting--but not using sand as an aggregate. They typically use a softer material like the husks of nuts. 

You then need to paint with a proper stucco paint that will breathe. 

It's not a simple job, unfortunately.

The DIY method would be using a lot of elbow grease and manually scraping as much of the flaking paint off that you can with wire brushes.