Using Bitcoin ATM in NYC
You will need a Bitcoin wallet to store your coins. Check out https://www.bitcoin.com/ for some options. 

After you set up a wallet you will get an address where you can store coins. (The address will be a long string of letters and numbers but you will also get a QR code, which is basically the same address but in a form you can scan)

If you then find an ATM you can insert cash, scan your QR code at the machine and you will get the coins sent to your wallet. 

That's basically the process of how ATM's work.