The light and flaky layers of puff pastry, croissants or Danish pastry is created by enclosing butter layers in the dough, something called laminating. The butter layers seperate the dough layers and trap the steam during baking creating the typical honeycomb structure.
When laminating two different kinds of folding the dough can be distinguished: the single fold and the double fold
For the single fold the dough is folded in thirds like a letter.
For the double fold the dough is folded from both sides into the middle and then fold in half.
When rolling the dough after folding to a square again, I always roll in the direction marked in the photos above, starting in the middle to remove trapped air.