If you will NOT leave the transit lounge at the airport you are not required to have transit visa. 

Otherwise, if you wish to visit the city (Entering Turkey) then you will have to create a visa application online here:

https://turkishvisa.com/ OR at your nearest Turkish Representation depending on your nationality.