Upvote:3
If, and only if, you have a visa or residence permit from a Schengen state, the UK, the US or Ireland, you can get an e-visa through this website https://www.evisa.gov.tr/en/
Otherwise, you'd Need to apply for a transit visa at a Turkish embassy.
There is no special 24-hour transit visa I'm afraid, so these are your options