How do you erect a crane. surely you would need a crane to make a crane.?
Not necessery. You can make it with Pulley blocks.
Modern building cranes (the tower cranes that you see on most building sites) have the ability built in to jack themselves up as the building grows. Jacks raise the crane at ground level, allowing a new section to be inserted at the bottom of the tower. But the crane arrives at the building site in pieces, and a small truck-mounted or crawling crane may in fact be required to assemble and erect the tower crane - so, except for the smallest cranes that could be put up by hand, you are correct.
Yes you need a crane to erect a crane. A large mobile crane is required to erect a tower crane but the mobile crane is much more expensive so it saves money by only being on site for a few days to erect/dismantle the tower crane.