Like jdv's comment, the easiest way to ensure that the edge you're planing is square is to use a shooting board. (Note there are two styles of shooting board, one for endgrain where you plane towards the back of your bench and one for edge jointing where you plane across the bench.) I won't get into details since this is a much bigger topic that has been covered in other questions.
However, some boards are too large to easily shoot on a board. For those there are a few factors that play into keeping your edge square.
The first, and probably most significant, is your plane's lateral adjuster. This is the lever between the top of the tote (handle) and the blade. This lets you balance the cutting depth between the two sides of the plane. Sight down the sole of the plane to see the blade projection or take a test cut and then move the adjuster towards the thicker side of the shaving.
The next thing to look at is your body position. For edge jointing you're typically planing across your body. Typically you'll tilt the plane towards your body, taking heavier shavings on the close edge and lighter on the far edge. To counteract this try to make sure your dominant elbow is in line with the board.
In general, though, squareness is never something that should be assumed. When edge jointing a board you should have a small square close at hand and check several points on the board every few passes. If you're out of square use a little more pressure on the high side of the board and check again. This is definitely a tactile skill that takes some time to develop, so don't get frustrated if your first few edges take a long time to get straight and square.