Heemskerk has a train station served by local trains between Uitgeest and Haarlem. However, because of its location, lack of service, and the lack of a bus stop the station is predominantly used by people who live very nearby. The train stations in Beverwijk and Uitgeest have more service, and are linked to all of Heemskerk by bus (line 74 en 167 from Beverwijk and line 73 from both).

Line 167 runs from Castricum to Beverwijk via the centre of Heemskerk. Line 74 starts in the north of Heemskerk and runs through all of Heemskerk to end op in IJmuiden via Beverwijk. Line 73 starts in Uitgeest and runs through Heemskerk to Haarlem via Beverwijk. All three lines have a common stop on the Ruysdaelstraat. For longer distances the bus is not the fastest option. Locals primarily use the bus for local trips in bad weather of to get to the train station in either Beverwijk or Uitgeest.

If coming from Amsterdam a fun way to get to Heemskerk might be by taking the Fast Flying Ferry from behind Centraal Station in Amsterdam to Pontplein in Velsen-Zuid. The hydrofoil takes about 25 minutes. From Velsen-Zuid it is about a 25 minute busride to Heemskerk.
If coming from England you could take the ferry from Newcastle to IJmuiden. From IJmuiden Heemskerk is about a 30 minute busride away.
If coming from below the North Sea Canal you could also cycle and take the free ferry from Velsen-Zuid to Velsen-Noord which goes every 20 minutes (24/7). From Velsen-Noord it takes about 20-35 minutes depending on your speed.