It depends on your telecom provider. Some allow tethering, and the iPhone 4 can tether out of the box if it is enabled by the provider. If it isn't, you have to jailbreak, then you can use tetherme, PDAnet or miwi. Tetherme is the cheap option which just enables the iPhone tether functionality, the other two are more expensive and offer a few extra tricks.
I am using tetherme for my iPad and laptop and it works fine. You can even stick a shortcut in sbsettings to turn on and off the hotspot quickly.