What exactly is pitch in terms of nuts and bolts?
Nuts and bolts start with two options, US or metric. US units tend to be in inches, metric units are typically millimeters. The size of the socket is completely separate from the size of the bolt and nut. The size of the nut/bolt is measured outside of the threads on the bolt, not the nut. So a 15mm bolt measured from the diameter from outside the threads, which would be written M15, could easily require a 30mm socket to install.

The pitch is how steep the threads are. On US nuts and bolts, they are measured according to the number of threads per inch. So a pitch of 20 would have 20 threads per inch. For metric nuts and bolts, it's measured in mm per thread, so a 1.50 pitch will be a thread every 1.5 mm.

The best option, if you can, is to take the existing nut and bolt to the store to find the replacement and ensure you get a proper fit.