I will be booking a flight from Ghana to Trinidad and Tobago but the flight will first go through the U.S.A. The layover time at the JFK airport is quite long and I will like to have a short tour of New York before I check in for my next flight. Will I be able to leave the airport if I don't have a visa or ESTA? I'm confused, please help me.
As detailed on the Do I need a US visa to change planes in an American airport? question, you're going to need either a Visa or an ESTA to change planes in New York. (The USA does not offer direct airside transit)
Once you're through immigration, have collected your checked luggage, then cleared customs, you'll exit basically out of the terminal. At that point, you re-check your luggage, and either head up to departures (same terminal) or take the AirTrain to change terminals.
If you want, and if you have time, there's then nothing stopping you taking the AirTrain to the metro or LIRR to ride into downtown Manhattan, or taking a bus or taxi.