I assume you mean tower cranes (lattice work giant T's) rather than normal mobile cranes (with about 8 axles). There are 3 basic ways. If the crane is fairly short (say <15m), they can come folded up. You take off the set of road wheels, and it 'unfolds' itself. For cranes up to about 30m, it is usually more economic to erect it using a normal mobile crane to lift the sections into place. For anything bigger (I think the record at the moment is held on a site in Germany at about 400m) the crane is self erecting. At this sort of height the crane is usually braced either to the side of the structure, or often goes up a lift shaft. In these cases, rather than build the whole thing at once, it grows with the building. It has a section (usually under the cab) which can extend 3m on hydraulics. The crane then lifts the next tower section up and its slotted into place and bolted home.