As an EU citizen you have the right to travel and reside freely in Denmark for up to 90 days within a 180-day period. This allows you to travel, work or study in Denmark without having to apply for a visa.
To ensure a smooth stay, you must have a valid travel document (a passport issued within the past 10 years and valid for at least 3 months beyond your planned departure), be able to document sufficient means (as a general rule about DKK 350 per day), be able to explain the purpose of the visit, not have an entry ban in the Schengen area, and register with the local authorities for stays over 3 months.
Special rules for certain nationalities: citizens from countries such as Australia, Canada, Israel, Japan, Malaysia, New Zealand, Singapore, South Korea and the USA have slightly different rules on the length of their stay. It is therefore important to check the specific rules for your home country.