Waveforms that contain more than one frequency component (i.e. aren't purely sinusoidal) may still be periodic.
If frequency components are (more or less) integer multiples of some fundamental frequency , producing a spectrum with (more or less) evenly spaced frequency components, they are called harmonics.
Signals with harmonic spectra have a periodic waveform where the period is the inverse of the fundamental frequency (often the sounding frequency).
Pitch is our subjective response to a fundamental frequency within the audio range.
The harmonics contribute to the timbre or quality of a sound, but do not necessarily alter the pitch.