Corn on the cob comes out differently every time I cook it. In theory, it should only take 5 to 7 minutes in rapidly boiling salted water, but I have noticed that we don’t usually get very fresh corn so sometimes a lot more time is required. Recently I cooked it for 15 minutes and it still seemed a bit tough.
A really nice method I discovered is to buy corn in the husk, peel back the green part, remove the silk, rub with butter and salt, then fold the husk back over the corn, wrap in Saran Wrap (I use classic Saran Wrap because it’s microwave safe plastic wrap.) and microwave for about 4 - 5 minutes for 4 pieces. I’m not sure about the timing, but it should be seething hot, so it actually cooks the corn. For some reason the husk makes it much more flavorful.
On the grill: Just wrap in foil instead of Saran Wrap. Timing, again, is tricky. It depends on how hot the grill is. I would guess you would need at least 15 minutes, turning often to avoid scorching too much.
Amanda has been putting the corn in a very hot oven --450º--on a cookie sheet without peeling anything. She says it's great. Just husk afterward and it's easy and good.