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.
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.
It is probably easier – and cheaper – to buy a single-use card that is only valid for traveling to your selected destination. It is cheaper to buy a day return, than to buy two single fares. A day return to Amsterdam will cost you around €9,40 per person.
You can 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 (cash only, so better safe some coins if you want a happy bus driver!).