It stops the pastry rising in the oven, when you are making a pastry case, say for a flan.
You can buy "baking beans", where you put grease proof paper over the pastry, and add the "baking beans" (not to be confused with baked beans), which weight the pastry down and stop it rising.
I think you could use something else like dried lentils to weigh it down - probably cheaper.
Personally I take the pastry out when its halfway through cooking and press it down at that point, which seems to work quite well.