Is jailbreak the same as unlock?

So i recently jailbreaked my iPhone 4 because i wanted to be able to change my SIM card without having to pay £40 to get it unlocked professionally. I understand that i took a risk in doing so but my phone is okay so i'm not that worried. However, when i tried to put in another SIM it either did not recognize it or it didn't work, because i was unable to do anything that required a SIM card. Why is this? Is it because jailbreak doesn't unlock it or is it because of something else?

No! Jailbreaking and unlocking your phone is different. How about you go do your research on google, it will help you understand

Jailbreak and Unlock are two different terms but they are both usually confused. Jailbreaking allows a user to install third party applications, software, themes and removes the limitations that are on the apple device. In short it gives the user the root access to iOS whereas unlocking means the user can switch between network carriers.
In your case you have to unlock your iPhone4 you can contact the network provider, use tools or get the unlocking from third party providers. But I suggest remote unlocking would be simple and easy for an iPhone. For mobiles that is bought after Jan 26 2013 unlocking is illegal in US, therefore you need to inform your network provider if you are going to get the unlocking service from a third party provider. Once you get the remote unlocking you can follow the free instructions from http://www.mobileunlockguide.com/apple-iphone-4 which will guide you in the remote unlocking process.