Gable roofs, also called pitch roofs, slant on two sides from a peak. Hip roofs slant down on all four sides, to form a level edge around the house. Gable roofs are more common. Hip roofs are sometimes preferred because they can offer more usable living space without the steep sides. Converting a gable roof to a hip roof is a major undertaking. It is best to consult an architect, since the change will involve structural elements of the house, and the job will require time, effort, money and construction experience.
Remove the existing roof back to the truss where your hip roof will begin; that dimension will vary with the length and width of the house but will usually be the same distance from the gable end as the distance from the gable eave to the peak. Consult roofing tables online or at building supply stores to get proper pitches and distances. You need to strip the roof down to the joists of the floor below (if the joists are covered with flooring, you can leave it) and the truss. Cover the exposed roof with a tarpaulin between work sessions.
Measure for a ridge board and two side common rafters, and use 2-inch by 4-inch boards to run from the gable roof truss to the wall cap, with the ridge board in the centre and common rafters diagonally to the wall corners. Measure and cut side rafters, called jacks, which run from the diagonal common rafters to the walls. Consult rafter tables to determine angles for cuts; lengths of these rafters will change from the peak to the eave but need to extend beyond the wall the same distance as rafters on the side eaves; notch them to fit over the wall cap or use metal rafter hangers. Nail these rafters in pairs, one on each side of the roof down to the eaves, starting in the centre of the common rafters.
Measure and cut rafters for the hip end to run parallel to the ridge board from the side common rafters to the eaves. Consult rafter tables for appropriate cut angles. Overhang by the same distance as the side rafters, with notches to fit on the wall cap or hangers to hold them to the wall. The final rafters on each corner are called hip rafters and must be cut at sharper angles to form square corners.
Cut short joists to fit from the end wall cap to the rafter overhang (existing joists under the old roof should already have this overhang). If the existing side rafters have a fascia or facing board on the ends, nail a fascia to the ends of the new rafters. If there is a covering on the soffit, or roof extension, on the old roof, put one on the new roof. Fascia and soffit covers are mostly decorative and can be omitted.
Use extreme caution when working on a roof. If you don't have prior roofing experience, hire a licensed roofer instead.