Leiden is appr. 20 minutes by train from Schiphol Airport (Amsterdam).
The train station is underneath the main airport plaza. See: https://www.schiphol.nl/en/page/by-train-from-schiphol/
Train times: www.ns.nl
Tickets: you can buy a ticket from the yellow ticket machines. You will need a single ticket to Leiden. Instructions for the ticket machines: http://railthetrails.blogspot.nl/search/label/E.%20Self%20Service%20Ticket%20Machines
Tourist info Leiden: https://www.visitleiden.nl/en/discover-leiden