Transit visa at Istanbul Airport, Turkey, during a Turkish Airlines arranged stopover?
Yes. If you want to enter inside Turkey, you'll definitely need a visa prior to your entry i.e. visa on arrival is not applicable (phased out).
The situation with the Turkish visa for Nigerian nationals is a little bit more complicated than one might expect.
The Ministry of Foreign Affairs website reveals,
Nigeria: Ordinary and official passport holders are required to have visa to enter Turkey. These passport holders with a valid Schengen or OECD member's visa or residence permit may get their one month period single entry e-Visas via the website www.evisa.gov.tr.
So the rules states that you are applicable for a conditional one-month electronic visa (only for tourism or commerce) and this visa is the one which you will need in order to enter Istanbul for tourism purposes. A transit visa is only for air-side transit and is not applicable here.
The Wikipedia article also states,
- all except citizens of Afghanistan, Bangladesh, China, Egypt, India, Iraq, Mexico, Moldova, Pakistan and Taiwan must hold a round-trip ticket to Istanbul Ataturk Airport with Turkish Airlines.
- must hold a hotel reservation and adequate financial means (US$ 50 per day).
This I believe will not be an issue in your case since I analyze this to be a requirement for a proof of onward travel. Since you are already in transit to Nigeria, you have this requirement fulfilled. The hotel reservation and financial means I also believe shouldn't be an issue.
This leaves the only real issue i.e. you have to have either a valid Schengen or OECD member's visa or residence permit. If you do have a visa from one of these countries, by all means go ahead and apply for the electronic visa in the link I provided earlier. Otherwise, you will have to visit the Turkish Embassy or Consulate in order to get a visa.
In both cases, you must ensure that you have a visa prior to your entry inside Turkey.
Yes, if you want to leave the airport.
However you can transit through the airport without a visa.
The Turkish Ministry of Foreign Affairs says
Question: I will be flying to Europe. I know that our aircraft will land in İstanbul. I am not planning to leave the transit lounge. Do I need to get transit visa?
Answer: If you will not leave the transit lounge at the airport you are not required to have transit visa. Otherwise, you have to make visa application to the nearest Turkish Representation. Contact information of the said missions can be reached through www.mfa.gov.tr (Ministry/Turkish Representations).
On the Turkish Airline Website it is also clearly marked that
International transfer passengers continuing to a foreign destination with Turkish Airlines
Passengers disembark with only their cabin baggage and proceed directly to the boarding gates without any flight or passport procedures.
The airport's website also says
Transfer Passengers:(International Transfer Passengers With An International Connection Flight) A boarding card is issued for the passenger (if not issued in the country of origin) at the transit desk of the relevant handling company on the Arrivals floor. The passenger does not go through passport control. (again emphasis mine).