Basically I make 2 kinds of knots when I sew by hand. The classic knot, meaning in the thread, and the hidden knot on the fabric itself.
For the knot in the thread, I don't use any special technique. I know you can wrap around your needle and slip, but I never mastered that technique. Instead I make a loop at the end of my thread and pass the end through, Then I repat a couple of times to make a larger knot. See the video for a better understanding.
The hidden knot must be made directly on the fabric. Insert your needle 2 cm from the first stitch, then bring it out. Pull until your thread protrudes 2 cm. Stitch 2 mm from where your thread comes out and comes out at the first stitch. Just before tightening the thread, slip your needle through the loop to tie a knot. Pull to tighten your knot by holding the end of your 2 cm still sticking out.