To get to Denmark Western Australia from Perth, take the Albany Highway / State Route 30 from Armadale and head SOUTH for 380km (4hrs 15 mins) to Mount Barker. Then turn RIGHT at the roundabout at Mount Barker, then LEFT onto the Denmark-Mount Barker Road (25 mins). One final RIGHT turn onto South Coast Highway / National Route 1, and in 4 minutes you'll arrive in Denmark WA!
Travelling to Denmark WA is only PRACTICAL by car/bus. It is possible to fly from Perth to Albany, and drive west along South Coast Hwy / State Rt 1 for 55km to reach Denmark Town. Unfortunately, there are no train services to the south coast.
View a MAP: https://goo.gl/maps/3FmWLgHawJ4z4B5U6
The fastest, most practical way to get from Perth to Denmark WA is to DRIVE (4.5hrs).
Yes, you can fly from Perth Airport to Albany (55km east of Denmark WA) then take a bus, however between layover times and bus transit schedules it is likely to take a LOT longer to get here than driving. AND, your freedom of movement and ability to explore will be VERY limited if you arrive in Denmark on foot, as almost everything in Denmark WA is set away from town.