Pastry dough is made of fat (usually butter), flour, and a thin liquid (usually water), worked together with specific techniques, and shaped into a specific final form. Pastry dough is typically light and flaky with a tender inside.
In place of butter, any fat, such as shortening or lard, may be used. A flavor-enhancing liquid, such as brandy, may be used in place of plain water.
Pastry includes croissants, some pie crusts, danishes, tarts, baklava, pâte à choux, as well as things made with phyllo dough or puff pastry.
Baked goods made from poured batter or constructed via the creaming method (beating sugar into fat creates air bubbles) are not pastry. This includes cake, cookies/UK biscuits, standard doughnuts, waffles, meringues, graham cracker pie crusts and quick-bread style muffins. Please use the baking and (if applicable) quickbread tags for these instead.
While a pastry chef is a chef who specializes in desserts, and a pastry shop (pâtisserie) would serve all kinds of sweets, these terms are used in a very broad sense and should not be taken into account when deciding what "pastry" is. For example, a pastry cook may also prepare cakes, but cakes are not literally pastries and do not belong in this tag.