This is a very common problem in bathrooms. Usually it is the ceiling which is affected most and it is usually noticed first over the shower. It is especially common in newish homes. In fact I have even been asked by other trades people why their bathroom ceiling is peeling off.
Bathrooms and especially shower rooms are generally areas of high humidity and some rely on an extractor fan to help reduce it. However, good ventilation is often insufficient to stop the peeling, especially when unsuitable paints have been used.
Lots of new homes are finished with cheap builders paint or contract mat. These paints are really only suitable as an initial coat to seal new plaster. They are not hard wearing, will mark easily and can't really be cleaned. Any cleaning usually results in the paint coming off on the cloth or sponge.
Unfortunately these paints are very absorbent and the humidity from a hot shower soon gets into the surface and the paint begins to peel away from the plaster. Depending on the area of the damage it can be a lot of work making the ceiling look good again.
Ultimately the best way to deal with it is prevention. Applying a decent quality paint such as an acrylic eggshell will prevent this from happening.
If you are applying the paint to a bathroom which has been in use it should also be washed and rinsed to ensure no cosmetics etc are on the surface. They may interfere with the adhesion of the new paint.
If I am asked to paint a bathroom I prefer to use an eggshell from the Little Green Paint Company. It has good coverage, plenty of pigment and it flows out well. The sheen is not too high for an eggshell. Sometimes if I am asked to paint a bathroom plain white and the budget won't allow for Little Green I use Permoglaze acrylic eggshell. Still a good quality paint but sheen is higher than some eggshells.
The other advantage of using eggshell in a bathroom is that it is easier to clean. Bathrooms often get splashes which can otherwise mark a flatter paint.