When you flatten something, you crush it or level it out. If the recycling bin is getting full, you should probably flatten all those cans you're adding to it.
You might flatten the batter in a cake pan before baking it, or flatten the grass along a path through a field. If your curly hair tends to get frizzy in humid weather, you may try to flatten it before you leave for school in the morning. You also might flatten yourself against a wall if you're hiding from your friend, or describe a terrible storm this way: "The tornado managed to flatten several buildings."