I heard that putting spices in something and putting it in the oven will eliminate the taste of the spices. Is this true? For example if I were to put spice in lasagna before putting it in the oven you will not be able to taste the spice afterwards. 
The flavors of most spices are quite stable, and will not be destroyed by cooking from any method, including baking.  You will see that traditional recipes often add spices at the beginning of a recipe, especially for robust hard spices like cinnamon, anise, caraway, cumin, allspice, dried chili powder, and so on.  In fact, in many cuisines, the spices are bloomed by frying or toasting as part of assembling the dish in order to bring out their aromas and flavors.  This idea may have originated with herbs (especially the more delicate ones like basil, tarragon, or cilantro) whose flavors are more volatile or heat sensitive, and so are traditionally added in the last few minutes of cooking, or even after the cooking.  Even so, with herbs, this is not universal as some of the more hardy ones do stand up to cooking, such as oregano, sage, and similar. 