Prepare to spend a little cash on a wild ride. You are about to go from an expensive, Jet-A-enriched glass-and-steel shopping mall to an acoustic-tile-ceilinged underground train pit with a bowling alley on top.
Load up Google Maps and pick the result that has you taking AirTrain to Jamaica, and then a cluster of colorful names including Babylon, Hempstead, Long Beach, Port Jefferson, and Ronkonkoma to Penn Station.
Once in the baggage area of any of the terminals follow the signs for Ground Transportation and then AirTrain. Board (ticketless) a Jamaica Station-bound AirTrain. Do not board a Howard Beach-bound AirTrain. Once at Jamaica Station, swarm with the others to purchase a MetroCard of at least $5 value. I recommend just getting a $20 (plus $1.4536̅6̅ bonus!!!) card for your time here. The UI will try to create a false distinction between an "AirTrain MetroCard" and a normal MetroCard. Do not be fooled. You simply need a card with at least $5 v