There are a few different ways that you can cut a square hole in wood using a jigsaw. One way is to use a clamp to hold the piece of wood firmly in place while you cut along the lines of the square. Another way is to use a guide rail system which will help you keep the blade on track while you're cutting. You could also use a template or stencil to trace out the square onto the wood before cutting.
If you're cutting through thicker pieces of wood, it's best to use a saw with more power such as a circular saw or table saw. For thinner pieces of wood, a hand held jigsaw will do just fine. Just be sure to use caution and go slowly so that you don't accidentally veer off course and ruin your project!