Jailbroken and Unlocked are two different things. Jailbroken means the phone is able to use third party software not sanctioned by Apple. Unlocked means you can use the phone with any SIM.
If you're not Jailbroken when you don't want to use data go to Settings -> General -> Network and flip Enable 3G to off. However like Tramain said there are lots of things that use data and if you turn 3G off your phone might still just connect using Edge. So if you have Fetch on for Mail, App Store, alot of Apps they use data once you open them up. So another option is to Jailbreak your phone and get SBSettings which will enable you to turn off Edge and turn on and off 3G whenever you want to use data.
I've added a screenshot of my SBSettings with both my 3G and Edge turned off.