The most common cause of paint peeling from walls is due to improper application of the paint on the walls.
Some people paint the walls without using primer which helps the regular paint stick to the wall and without that primer the paint won't stick to the walls properly.
Other causes are moisture or high humidity that can cause the paint to peel.
You'll need to scrape the paint off the wall and sand it then apply some primer to the wall first and then after the primer dries you can apply the paint and it should not peel off.