Will my apps and pics remain on my iPhone once I switch network?

I have an iPhone 5s on an o2 network but I want to switch my network to t-mobile, when I change the sim card to t-mobile (after unlocking the phone) will everything such as pictures and apps remain on my phone?

I think so, but backup your phone before you do it just to be sure. You can backup your phone via the apple website x

Definitely yes. Your apps are between you and Apple and your pics are between you and the device. Neither has anything to do with your service provider for the telephone. Back up to iTunes on your computer in the normal way. You will have to sign in to iTunes anyway to reset your phone to the new provider.