If you will NOT leave the transit lounge at the airport while in Turkey, then you are not required to have transit visa. 

Otherwise if you wish to leave the airport, then you HAVE TO apply for a Turkish visa.

You can apply for your visa here:  https://turkishvisa.com/