You can buy a regional public transport card at the station or a tobacco shop. You can buy a Holland Travel Ticket or Amsterdam Region Ticket online in advance.