The most common styles of house roofs are gable and hip. Gable roofs slope on two sides from a peak. The gables form a triangle on either the sides of the structure or on the front and back. A house with gables at both ends is double-gabled. Gable roofs are typically made with prefabricated trusses which connect the sides of the structure and support the roof decking and covering. Hip roofs slope on all four sides and form an even edge or eave around the building. Hip roofs use a combination of joists between walls and angled rafters to support the roof.
The most common variations of gable and hip roofs are cross-gabled or cross-hipped. Crosses are used for L-shaped structures or structures that are not box-shaped. Another variation of the hip roof is the pyramid, in which all four slopes go to a center peak. A variation of the gable is the saltbox, with sloping sides at different angles and of different lengths, so the peak is not in the center of the building.
Flat roofs generally are used on commercial structures or special styles of houses. They are built-up roofs, composed of alternating layers of roofing paper, an asphalt-type compound and gravel. They are never totally flat, always having a slight slope, usually from the center to the corners. The slope is for drainage and drain pipes are typically installed at the corners. Shed roofs are simple slopes, from one side to another. They often are used on sheds, patios, carports and similar structures.
More exotic styles of roof are the gambrel and bonnet. Gambrel is the traditional barn roof with a peak, with multiple slopes that taper gradually down to an eave on either side. The ends of a gambrel roof form a sort of arch. The advantage of a gambrel over a gable is that it provides more usable interior space -- in barns that's typically where hay lofts are placed. The bonnet is a basic hip roof that extends from the building walls at a lesser angle and is supported on the corners by posts or piers.
A final variation in roofing is to combine styles, so a gable roofed house has a hip roofed addition on one side. Gable-hip combinations are the most common, but it is possible to combine other roof types, such as putting a shed roof on an extension of a gambrel-roofed building.