Almost all buildings are made of right angled corners and it can be surprising how hard those are to lay out.
For small items a speed square, or a framing square will suffice, but when you're trying to lay out two walls, they're not going to cut it.
To make a perfect 90 degree angle every time; measure 3 feet (or preferred unit of measurement) from the place where the two walls should meet and make a mark. From that mark using a 5 foot long piece of string scribe an arc roughly across where you think the perpendicular line should be. Then from the junction point of the two wall using a 4 foot piece of string and a pencil scribe another arc. Where these two arcs cross to the junction point is a ninety degree angle, every time, guaranteed.
For this tip, you can thank Pythagoras who came up with it a millenia ago.