Pupillary Distance (PD) is the distance between your pupil centers. This measurement is important when ordering glasses to make sure you are looking through the optical centers of your lenses. If you have glasses made by an optician they may take additional measurements, but those require the frame to be on your face, and standard values are used by online glasses suppliers for those measurements. This is fine for most people, but may be a source of discomfort for some.
Because your eyes converge to look at things close to you, your PD is going to be smaller when doing near work than for distance vision. If you are buying differentials or reading glasses your near PD should be used.