Theoretically, cooking refers to any application of heat to food:
cook |kʊk| verb 1 [ trans. ] prepare (food, a dish, or a meal) by combining and heating the ingredients in various wayways
NOAD
In practice, cooking usually refers to stovetop prepartation and baking refers to oven preparation. And each have their own more specific terms. Frying and sautéing are usually done stovetop and broiling and roasting are usually done inside the oven.