Most roofs are built so fresh air enters at the eaves and exits at the top of the roof. Cool air enters openings in the soffits. Warm air exits the roof through louvered openings in the gable ends or through ridge vents on the peak. An old-fashioned, louvered cupola serves the same purpose. A fan in a gable or in an opening in the roof can boost ventilation if natural circulation is not adequate.
Proper ventilation keeps the attic cool in summer and the roof cold in winter. A cooler attic helps reduce air conditioning costs, while a cold roof in winter keeps snow on the roof and prevents sudden avalanches. A consistently cold roof keeps ice dams from forming. Serious leaks can develop when daytime melt water backs up behind an ice dam and penetrates the roof behind the shingles. Keeping the roof cold also prevents moisture from condensing on the interior sheathing, which can cause mildew and rot to sheathing and rafters.
Insulation maximizes the benefits of ventilation. Insulation can be installed in the attic floor or on the roof between the rafters. On the roof, insulation allows a warmer attic but still keeps the roof cold. In this application, foam or plastic channels placed against the sheathing allows cold air from the soffits to travel up and keep the roof cold. In either case, insulation should not interfere with the entry of air from the soffits.
If you intend to finish the attic to create living space, you'll have to insulate between the rafters. Using spray foam insulation rather than fiberglass batting, between the rafters is an option that eliminates the need for a ventilation channel against the roof. Insulation needs -- or R-values -- vary according to climate and region, so check with a local building official to determine the requirements for your house.