Once you've jailbroken your iPhone, install or open Cydia and navigate to the "Featured Packages" section. Find and install the package named "Modem." That's it on the iPhone side of things, on your computer, navigate to iphonemodem.com and download the helper application or register the application for $9.99 to disable the registration reminder in the iPhone app (As far as we know, the free version is fully functional). Drag iPhoneModem to your Applications folder.
The setup is really that simple. Now all you have to do is open the application on your computer, click connect, then launch the companion app on your iPhone. The iPhone application will find the network your computer creates and share the Wi-Fi connection between the two devices so you can use your iPhone data plan on your laptop for better browsing. Here's how the developers say it works:
I've had pretty good success with this application in my time with it. I've been using it on and off for over a year -- it's been a great app in clutch situations. I'd recommend it as a virtual stocking stuffer if you have a friend or family member who's jailbroken their iPhone. Let us know your thoughts or your experiences with the app in the comments.
On the computer, the helper application creates a new computer-to-computer (or ad-hoc) Wi-Fi network and configures the system preferences to use the iPhone as an Internet gateway and proxy. On the iPhone, the application opens a routing engine, DHCP, DNS, HTTP, HTTPS and SOCKS proxies and connects to the helper on the computer.
As several commenters have pointed out, there are several other free solutions that seem to be just as easy as iPhoneModem. Please read through the comments to see if any of those solutions suit you better.