Button stitching can be done manually and by machine. How to sew buttons by hand I think there is no need to explain much, the first picture shows the forms of sewing buttons, if the button has two holes then it is only one dash "-" and with buttons with four holes three ways are used: "=, X and V "shape.
When sewing by hand, tighten the thread as much as necessary, if you want a slightly looser sewing, you can place the most common toothpick or needle above the button, and finally fasten the end of the thread on the underside.