Hi Connie: A couple of points on installing chair rail
Assuming your wall is fairly flat (if the house has been built since 1960, the walls should be drywall and should be flat. If around 1950 or earlier, the walls may be plaster and may be a bit wavey), the first order of business is to locate the studs. Most houses have their studs on 16" centers. After you determine the height of your chair rail (and this will vary from 30 to 40" off the floor, depending on the height of your chair backs), hold the rail up and mark with a pencil where it will be placed. Then on the spot behind the chair rail, drive in an 8 penny finish nail until you hit a stud. You may have to tap several holes. Another way is to use a stud finder that uses sound waves to detect the higher density of the studs (these finders are available at Builders Emporium or Home Depot for $16 or so). Once you find a stud, measure over 16" each way and tap in a nail to ensure you have found the neighbor stud. Keep doing this until you locate all studs on the wall you will be putting the chair rail up on. I mark these studs with a short piece of masking tape. Then hold up the molding to your desired height and nail up one end (while someone holds up the other end). Then put a level on top of the molding, get it plumb (perfectly horizontal) and nail in at the next stud. Use 8 penny finish nails. At a corner joint, put the first piece up and run it into the corner up against the wall, Put the piece for the next wall up against it, and with the piece plumb, take a compass and while holding it perfectly horizontal, follow down the contour of the face of the piece already up with the sharp side of the compass while marking the adjoinig (at 90 degrees) piece with the pencil side. Then cut to this line with a coping saw, tilting the saw just slightly to the back of the piece. When done, this piece should butt perfectly up against the existing piece you already put up on the wall. If its an outside piece, you will have to cut 45 degree miter cuts. Best tool to use is a power miter box saw, and if not that then a table saw and if not that then a simple plastic miter box with a mitering saw....which can be had from places like Home Depot for $20 or so. Be sure to use a nail set to set the heads of your finish nails below the surface of the wood.
I would fit all pieces first, temporarily tacking them up into place as you fit them (only drive the nails part of the way in). Once all pieces have been fit, take them down and do your finish sanding, then prime them (if you intend to paint them). You can then sand and apply your finish paint before putting them up, but then you will have to set nails, fill the nail holes (with a filler or spackling compound), then prime and paint each touched up nail head.