You need to have your shoulders to your knees covered and a headscarf. You'll remove your shoes, so if you're visiting a lot of mosques try and wear shoes that are easy to slip on and off.
The restrictions are pretty loose in most of the mosques in Istanbul. Even cap sleeves seem to generally be ok. Most mosques have spare scarves and robes or long skirts that you can put on top of whatever you're wearing, but it's best to be prepared by dressing appropriately.