Thread pitch is how close the threads (the little spiral around the edge of the screw/bolt) are together, can also be referred to as tpi (threads per inch).
So a fine thread pitch has the threads closer together (typically 0.75mm on a "Fine" M6), whereas a coarse thread they are slightly further apart (typically 1.0mm on a "Coarse" M6). There are however other variants, e.g. 1.25mm is also a possibility.
Using the wrong thread pitch will feel like the screw is cross threading.
If you know the length of the screw e.g. 25mm you count the number of turns, and divide it, so 25mm / 20 turns = 1.25mm