Place a scrap of fabric under the presser foot, then using the screwdriver in your tool kit, loosen the screw holding the needle in (to the right and above the needle). Unscrew enough for the needle to drop out.
Select the appropriate needle for the project you are about to work on and insert as far up as possible in the hole. Machine needles have a flattened shank on one side which is used to ensure correct insertion. Generally the flat part is faced to the back of the machine (check your user’s manual).
Holding the needle in position, tighten the screw by hand, then finish using the screwdriver. This is important to ensure it remains securely in place when stitching. A needle that becomes loose will wobble about and bend or break, possibly damaging the throat plate and bobbin race.
If the needle breaks when stitching (without any apparent reason) it is probably too small. Try a larger one. If the seam pulls up, there are obvious stitch holes or stitches are skipped, it may be too big, so try a smaller needle.