Many dogs will stay around your home nearly all the time if you let them out, but not your whippet. Something (a cat, a squirrel, a piece of paper blowing across the street...) will catch his eye and he'll be gone, at up to 35 miles-per-hour. Other breeds that run off will usually come back in no more than a few hours if they don't get hit by a car. Probably not your whippet: At that speed, by the time he slows down, he may be completely lost.
Most dogs can be taught to COME when called but very few whippets ever get 100% reliable. Again, it's training versus instinct. Your whippet must be either leashed or in a securely fenced yard every time he's out for his whole life. A 4' fence is enough if a whippet is not a jumper or climber. Some do dig, but it's not too common a problem.
Security is critical. We don't even walk a whippet from the house to the car without a leash. It is amazing how quickly the worst can happen, and the first time a sighthound gets away from you can easily be the last. It's tempting to become casual about it when your whippet is generally obedient and calm. Remember that if he's okay off-lead 99 times out of 100, that 100th time could be the day you lose your best friend. Nearly every week on the internet there is a whippet reported missing, and too often these stories end sadly.
If your whippet does get away from you, don't chase him. There's no way you'll catch him. If at all possible, get his attention. (This is nearly impossible if he is chasing something, however.) Then fall on the ground and begin laughing and shrieking. He will come back just to see why in the world you are acting so strangely. Don't grab at him. Calmly take his collar and vow never to let go of him again.