A well-fitted vest is long enough in the front to cover the man’s waist (hence “waistcoat”), with no dress shirt showing between the belt and the vest. The sides and back will be cut a little higher, and may show some shirt; be sure to wear a well-fitted shirt tucked in tightly to avoid fabric “ballooning” out in little puffs from under the vest. They look silly and draw attention to the waist, which most of us don’t need.
The tradition is more than a hundred years old and stems from the same rules applying to jackets. There’s no practical reason for it nowadays (except perhaps to give off a more casual flair) — it’s just a way of showing that you respect tradition. Be sure to let your friends know when they helpfully point out that your button’s undone!