One of the great things about Haarlem is that it is so close to Amsterdam.
And it is super easy to get there, too.
Easiest way: by train. Trains leave eight times per hour from the central station in Haarlem and take you in approximately fifteen minutes to Amsterdam CS.
Tip: buy an Amsterdam Region Travel Ticket. This ticket gives you unlimited travel by train between Haarlem and Amsterdam CS (but you can also hop on and off at any other train station in Amsterdam). But that’s not all. This ticket is also valid on all trams, busses, metros and ferries in Amsterdam. You can buy this ticket for €18,50 (valid for 1 day) at the NS Tickets & Service counter at Haarlem train station. Online purchase also possible, go here.
If you are planning to take the train more than once during your stay, you can consider buying a pre-paid public transport card (OV-chipkaart in Dutch). But, you need to put at least €20 on your card as a starting fare. Buy your train ticket (both the pre-paid and the single-use cards) from the yellow ticket machines or at the NS service counter in the central hall.
Important: you always need to check in and out with your card, regardless of the card you are using.
Depending on where you are staying in Haarlem and where you want to go in Amsterdam, it might be easier to travel by bus to Amsterdam. Bus station Houtplein is your best point of departure.
The busses won’t take you to Amsterdam Central Station, but they will bring you to the outer skirts of the city (mostly the west and south).
Bus tickets can be bought from the bus driver (debet and credit card only, no cash!).