The nearest major city is Frederikshavn, 41 km to the south, which has rail connections to Aalborg and the rest of Denmark. A private railway line (the Skagensbanen) runs between Frederikshavn and Skagen, taking about 35 minutes.
By car, Skagen is about 2.5 hours from Aalborg and 4.5 hours from Copenhagen. The A10 motorway takes you most of the way north through Jutland. Note that the final approach to Skagen is a single road through the Skagen Klitplantage (dune forest), and the town has limited parking in peak season.
There is no airport in Skagen — the nearest airport is Aalborg, served by domestic flights from Copenhagen and a handful of international routes.