According to the Constitution, Danes have freedom of religion, but the vast majority belong to the Danish State Church which is Lutheran. Christianity was introduced about 1000 AD, and with the Reformation in 1536 Protestantism succeeded Catholicism as the predominant religion. The churches you see today in inner Copenhagen, with a few exceptions, date back to the mid 1500's.
For information about the two most famous cemeteries in Copenhagen and the city's churches you can search below.