Typically, the coronation ceremony as we know it takes place several months after a king or queen has ascended the throne, which happens immediately after the reigning monarch has stepped down or passed away. The coronation is delayed to allow for a respectful period of mourning (if the reigning monarch has died) and to organize the massive event. For the past 900 years, the ceremony has taken place at Westminster Abbey in London and has been conducted by the Archbishop of Canterbury.
The ceremony is a deeply religious one, and there was quite a bit of controversy over having Queen Elizabeth II's coronation televised in 1953 due to the religious element. The coronation is also full of old traditions and priceless heirlooms, like King Edward's chair, which was made in 1300 and on which the sovereign sits. If a king is sovereign, then his queen consort will often take part in a simpler coronation ceremony after the main one. However, male consorts (like Prince Philip) cannot be crowned. Queen Elizabeth II was crowned with Saint Edward's Crown, which is the traditional coronation crown, although many monarchs choose to either be crowned with their own special piece of headgear that has been specially made or a different piece from the royal collection.