My experience in paint, first of all, take a sanding block it is light brown. Square. Home depot and Lowes carries these in the painting department. Lightly sand the chair rail and the wall. dust off the sanded paint then clean the wall with Mr, clean sponge After that you need to buy a small can of plaster for the drywall. You have to lightly coat the wall not the trim, using a small troel. When the wall has dried sand it down, just don't make any fuzzys on the drywall, After the plaster and the wall is clean and dusted off, you need to use a primer use one coat on the wall and chair rail, you should just be able to sand off the chair rail. After the primer dries, make sure the wall feels smooth, if you need to sand just use the same steps, the most imortant thing is to keep the dust off the wall. Then add the paint you would like to use.
Hope this help and you understand, the painters Lowes or Home Depot, could help answer your questions