When filling with mousse, pastry cream, whipped cream, fruit, etc...Blind bake a pate sucree tart crust before you add the filling. Either use a fork to prick small holes in dough in the bottom of the pan or use pie weights on a round of parchment paper cut to fit the bottom of the pan and placed on top of the dough (dry beans also work well). This keeps the crust from puffing out while it bakes, giving you a flat, even surface.
When filling with custards...Fill pate sucree before baking.
Most recipes will tell you what to do once you have a crust ready.