It is a simple process to bake corn in the oven.
Preheat the oven to 425°F (220°C). Remove the husk and silks from the corn. Rub the ears with a little butter, and salt and pepper them judiciously. Wrap the ears in aluminum foil. Place on a rack in the oven and cook for 20 minutes. If they're big, heavy ears - what people used to call roasting corn - it may take as long as 30 minutes. (If there is some chance of melted butter escaping from your aluminum foil and causing your kitchen to fill with smoke, place a jelly-roll pan or some other flat pan with sides on a lower rack in the oven to catch the drips.)
Some people will tell you this is roasted corn, but since is does not actually involve exposing the corn to a flame, we're going to stick with calling it baked corm. (Yes, we realize most of the "roasted-vegetable" craze involves vegetables prepared in a hot oven, and perhaps even Ochef is not entirely consistent on this issue, but at the moment, we're feeling a little curmudgeonly, so, right now, at least, roasting involved exposure to actual flame.)
You can also put these foil-wrapped ears of corn on a grill for 10 to 15 minutes, turning every two or three minutes or so, in which case, you are allowed by us to call it grilled or roasted corn.