Symbiotic is the scientific term for this association, but the concept isn't new.
The Native American tradition of planting corn, beans and squash together
is a perfect example. The corn supports the beans and the squash provides
ground cover. In addition, the beans supply, or fix, nitrogen,
one of the essential elements of plant growth.
Use companion plants to attract beneficial insects for pest control and pollination.
Non-beneficial insects can also be attracted by plants. Use trap
plants to feed pests that otherwise would feed on your vegetables. 
When planning a garden, remember that companion plants, though diverse in their characteristics,
share the same requirements for growing conditions. Unless you recognize
and provide for these requirements, your plants will not succeed.
All is not plant utopia however. Some plants simply dont like each other. While
certain herbs planted side-by-side with vegetables improve the flavor
of their companions fruit, others impart a strong unpleasant taste
to their neighbors. Plants with shallow root systems compete with each
other for water and nutrients and neither thrive.
Companion planting remains an inexact science. Books are written on the subject,
so attempting to address it in a few paragraphs is somewhat presumptuous.
Accept it as one of natures wonders and experiment in your own garden.

To offer assistance, heres a brief list of some common herbs, vegetables,
and flowers and their garden buddies.
|
Plant
|
Likes
|
Repels
|
Dislikes
|
| Basil |
Tomatoes |
Mosquitoes, Flies, Hornworms |
|
| Beans |
Beets, Cucumbers, Corn, Radishes, Rosemary |
|
Onions, Garlic |
| Beets |
Bush Beans, Cabbage, Lettuce |
|
|
| Broccoli |
Herbs, Onions |
|
|
| Cabbage |
Dill, Mint, Onions, Rosemary, Sage, Thyme |
|
|
| Carrots |
Peas, Cabbage, Leaf Lettuce, Radishes, Tomatoes, Chives |
|
|
| Chives |
Carrots, Roses |
Aphids, Mites, Nematodes |
|
| Corn |
Beans, Cucumbers, Melons, Peas, Potatoes, Squash |
|
Tomatoes |
| Cucumbers |
Cabbage, Corn, Lettuce, Marigolds, Onions, Radishes |
|
|
| Dill |
Cabbage, Lettuce, Corn, Cucumber |
Aphids, Mites |
|
| Garlic |
Roses, Raspberries |
Japanese Beetles, Aphids, Mosquito Larvae, Caterpillars, Borers, Mites |
|
| Lettuce |
Beets, Cabbage, Carrots, Onions, Radishes |
|
|
| Marigold |
Most Plants, Especially Tomatoes, |
Nematodes, Whiteflies, Mexican Bean Beetles, Tomato Hornworms |
|
| Mint |
Cabbage, Tomatoes |
Cabbage Moths, Aphids, Ants, Flea Beetles |
|
| Nasturtiums |
Cabbage, Radishes, Tomatoes, Cucumbers |
Aphids, Pumpkin Beetles, Squash Beetles, Cabbage Moths, Potato Beetles, Whiteflies |
|
| Onions |
Beets, Cabbage, Lettuce, Tomatoes |
Borers, Mites, Slugs, Cutworms |
Beans, Peas |
| Peas |
Beans, Carrots, Corn, Cucumbers, Radishes, Turnips |
|
Onions, Garlic |
| Peppers |
Basil, Marjoram, Oregano, Carrots, Tomatoes |
|
|
| Petunia |
Beans |
Aphids, Leafhoppers, Mexican Bean Beetles |
|
| Radishes |
Peas, Leaf Lettuce |
Cucumber Beetles |
|
| Rosemary |
Beans, Cabbage, Carrots, Sage |
Carrot Flies, Cabbage Moths, Mexican Bean Beetles |
|
| Sage |
Cabbage, Carrots, Cucumbers, Tomatoes, Rosemary |
Cabbage Moths, Flea Beetles, Slugs |
|
| Spinach |
Cabbage |
|
|
| Squash |
Corn, Cucumbers |
|
|
| Tomatoes |
Basil, Sage, Marigolds, Nasturtiums, Asparagus |
|
|
| Thyme |
Cabbage |
Cabbage Worms |
|
|