Things to check:
Did you leave enough time between coats for the paint to dry and cure?
Has paint been applied too thickly in one coat?
Was the paint well-stirred so the amounts of pigment and water were the same each time you put your brush / roller in?
It's impossible to diagnose without seeing the problem, but if paint is applied too soon to a still-wet first coat, or too thickly in any one coat, it bonds to itself, not to the surface, and so will be likely to crumble and flake off very easily.