A creamed-corn or cooked-corn flavor is indicative of a compound called dimethyl sulfide (DMS). DMS is a by-product of malting, mashing, and fermentation, so it is present to some degree in all beers. However, it is more easily detected in lighter-colored ales and lagers, as it has a fairly low flavor threshold of 50–175 parts per billion.
All malts have a compound called S-methyl methionine (SMM), which is an amino acid formed during germination and kilning of barley malt as part of the malting process. This SMM is a precursor of DMS. Certain malts, such as 2-row malts, have less SMM than 6-row barley malt, and Pilsner malt has slightly higher SMM levels due to the low temperatures at which it is kilned. The malt house can reduce SMM slightly by under-modifying the malt or altering kilning temperatures. However, for the most part, SMM levels are outside the control of the brewer.
Heating the SMM during the mash produces two by-products. One is DMS, and the other is a related compound called DMSO, which is DMS with an oxygen atom attached. So mashing and sparging barley malt will create DMS in your wort.
Fortunately both DMS and DMSO are volatile and will evaporate if you have a strong rolling boil. So your best defense against a cooked-corn (DMS) off-flavor is, indeed, a long vigorous boil. If you are an all-grain brewer, you want to initiate a strong 90-minute rolling boil, which will eliminate the vast majority of DMS off-flavors. Also be careful not to cover the pot when boiling as this traps the DMS in the wort. Even some commercial breweries have DMS problems if they lack a blower or insulation on the vent pipe for their boil pot because it is common for DMS to condense on the inside of the vent and drop back down into the boiler.
Chilling your beer rapidly after the boil also aids in reducing DMS. If you have hot wort sitting around at high temperature for hours after brewing, some residual SMM will continue to be converted into DMS. However, if you chill quickly, you will reduce the chance for more DMS production.
There is additional DMS that is scrubbed from the beer during active fermentation. The CO2 bubbling up through the beer will take some DMS with it. So a good healthy yeast starter and strong fermentation will help to further reduce DMS.
A secondary source of DMS is bacterial infection. Bacteria and certain wild yeasts can create DMS. So if you have completed a strong rigorous uncovered boil and chilled your wort quickly but still have some DMS off-flavors, you should examine the possibility of an infection.
In either case, DMS is a very preventable problem. Boil your wort thoroughly for at least 90 minutes, never cover the boil pot, chill your wort quickly, sanitize your equipment properly, and initiate a strong fermentation to avoid DMS.