Hardwood floors are laid from one edge of the floor to the other, with spaces left by the walls to allow for the natural expansion of the wood. One issue you have to deal with before you start is squaring the room. Most rooms aren't completely square, meaning flooring that starts parallel to one wall could look crooked by the time you get to the far wall. That's why it's important to get your starting and ending lines square to each other.
Measure and mark ½ inch out from the wall at several points along the side of the floor where you're going to start the flooring, using a tape measure and a pencil. Hold the chalk snap line along the marks, with an assistant, and snap it, so you have a line sitting ½ inch out from the wall all along that edge of the floor.
Measure, mark and use the chalk snap line on the opposite end of the floor. These are your starting and ending lines, which will leave space by the walls to allow for the natural expansion of the wood flooring.
Measure between the two lines, at one end of the room and then the other, to determine how far out of square the room is, and how much the lines have to move to get it square. If the lines are 200 inches apart at one end of the room, and 201 inches apart at the other, it means the room is 1 inch out of square.
Adjust snap new lines, making adjustments so the lines are the same distance from each other. Spread the adjustments out along both ends of both lines, dividing the discrepancy by four, so you can move them as little as possible. For example, for a 1-inch discrepancy, move the wide ends of the two lines toward each other by ¼ inch each, and move the narrow ends of the lines away from each other by ¼ inch each.
Re-measure the distances between the lines at both ends to ensure they're consistent. In the above example, they should be 200 1/2 inches from each other. Install your floorboards starting at the first line and ending at the second. (Floor trim will cover the spaces by the wall.)