See the red thick lines and "spring" lines:
-- The thick lines means that that side of the control is attached to that side of the main frame
-- The "spring means that that side of the control is not attached.
Just open a example and play with it. It is very easy and useful.
- In the code
If you want to do it "the hard way" in the code, is very easy too as layout are translated into code with functions like LeftPosZ and so.
Anyway you can go to the GUI Tutorial section 16. Layouts where you can see examples and explanations.
There are more advanced features if you want fancier resizing but I think for now this enough .