Corn is unique in that it is both considered a vegetable and a member of the grain family, depending on when and how it is harvested. Sweet corn, the vegetable variety that is eaten on the cob, is picked in the “milk stage” when kernels are tender and have a sweet, juicy taste. Great eaten raw, even better when roasted.
Corn is best if eaten as soon as possible after harvest, because once picked, the natural sugars in corn begin to turn to starch and ruin the flavor. That's why there's no better tasting corn than from the farmers' market, where you know it has just been picked.
There are white, yellow, and bicolor varieties. Another specialty variety is the highly glutinous sticky corn, which is less sweet and chewier than sweet corn.