Taxes help pay for the extensive Danish social welfare system. In fact, many of the services, which you pay for individually in other countries, are funded by taxes in Denmark. Various services are partially funded by taxes, e.g. libraries, roads, schools, state education grants, unemployment benefits, state pensions, healthcare system and child support.
In Denmark taxes are collected by the tax authority called SKAT, and you need to register with SKAT before your first payment in Denmark. You are required to pay taxes if you have an income. Your employer obtains the tax card digitally from SKAT, and your taxes are automatically deducted from your wages, before you receive your payment.