Being granted asylum in Denmark means that you are granted a residence permit as a refugee and are thus protected against being sent back to your home country. You can be granted asylum if you are at risk of persecution, torture, or other inhumane treatment in your home country.
The obligation not to send a person back to a home country where he or she is at risk of persecution, torture, or other inhumane treatment follows from the UN Refugee Convention, the European Convention on Human Rights, and the EU Charter of Fundamental Rights, to which Denmark has acceded. In Denmark, you are granted asylum under section 7 of the Danish Aliens Act.
When you apply for asylum, you are registered as an asylum seeker with the Danish Immigration Service. It is the Danish Immigration Service and the Refugee Appeals Board that assess whether asylum seekers are entitled to refugee status or not.