Whether to choose hybrid or heirloom seeds is one of several choices to make when buying seeds.
Hybrids are created by crossing two varieties, sometimes by hand, manually placing the pollen from one variety onto the stigma of another variety. This is very labor intensive, so hybrid seeds are more expensive than non-hybrids. They are often worth the added price because they are more vigorous, more productive, and often more resistant to diseases. There wouldn't be any reason to go to all this trouble if there weren't an advantage. The seeds from hybrids won't reliably produce the same plant again, so you need new seeds each time you want to grow the hybrid.
For commercial growers one of the advantages of hybrids - in tomatoes, for example - can be increased resistance to bruising. Good for shipping long distances and enduring squeezing in the produce aisle. Not necessarily a great trait in the home garden, where a tender juicy tomato is prized. For other vegetables hybrids may produce a heavy crop all at once - so the beans, let's say, can be picked in one mechanical pass and then torn up and the ground replanted with something else. Saves a lot of labor at harvest. This might be an advantage if you freeze or can and want a lot of one vegetable at one time. Most of us would like an extended harvest so we have beans over a long time with one planting.
Heirloom is the current (fashionable) name given to open-pollinated varieties, also sometimes called "standard" varieties These produce the same variety each year from saved seed. These means you can save the seed yourself and save that expense. Most of us value taste over all other traits in our home garden, and heirlooms usually (but not always) have great flavor, which is why someone has bothered to save the seed for so many years. They often aren't as productive as hybrids. Brandywine, for example is a tomato with a reputation for outstanding flavor, but when I grew them I was disappointed by how few tomatoes I got. So breeders have tried to create hybrids that taste nearly as good but are more productive. Burpee's version is Brandy Boy, which I've grown several times. For a long time I thought Rose was Johnny's hybrid version of a Brandywine, but then I noticed they say it's an heirloom (but they don't list it with the heirlooms. hmm). It tastes like a brandywine and has hybrid vigor. Perhaps they aren't eager to point out you can save your own seed. Lots of people say they miss that "old time tomato flavor." They might very well miss Rutgers, a standard (heirloom) variety bred at Rutgers University, that at one time accounted for 75% of tomato production in this country. The seeds are still available and very inexpensive, and I often grow Rutgers.
There's no precise definition of an "heirloom," but it's often reserved for varieties that have stood the test of time and been around for 50 years or more. It's a romantic term that is to some extent marketing language. But new open-pollinated varieties are being created too, by cross-pollinating either intentionally or just letting nature take its course and then growing the results for several genertions and seeing what the consistent results are (whereas an F1hybrid is the first generation of a cross). One year some tomatoes sprouted in my garden in the spring and I didn't pull them up. I got a very short plant with tomatoes that sure tasted like sun golds. I ended up pulling up the plants, which was really stupid, because a patio sun gold tomato would be a really great thing. Not having been produced by hybridization, the seed might have come true in succeeding years.
Most tomato plants for sale are hybrid, while many pepper plants are standards, and that's okay. When you're buying seeds look for words like: vigorous, extended harvest, early, productive, great flavor, disease resistent, and match them to your needs in your garden.