When dealing with peeling paint, you basically want to scrape it off until it won't come off anymore. Scrape it with a paint scraper. Once you find an area that's not coming off anymore, there's no need to continue scraping. What we'll do next is sand that area, prime it, and make any necessary repairs with drywall compound.