The first step is to measure the wall. If you are measuring from a section of the wall that has trim on one end and a corner on the other, measure from the edge of the trim to the corner. Measure twice to make sure your measurements are accurate. You want to be precise to a 16th of an inch.
Using a miter saw, make your cut on a 45 degree angle. If you are using a compound miter saw, reverse your angle to cut the next piece. If you are unable to do that, flip the next piece to cut it.
If you are cutting baseboard for an inside corner, put your pieces up together and see how well they fit (Image 1). If it is not a tight fit, you may want to cope the baseboard. Using a coping saw, cut out the miter at a back angle to create a negative cut (Image 2). The cut piece should fit perfectly around the non-cut piece.