The frequency of an optical wave (and other types of electromagnetic waves) is defined as the number of times in one second the electro-magnetic field undergoes a peak-peak cycle. The most common unit to measure frequency is the Hertz (Hz). One Hertz represents one full-cycle of the optical wave in one second. Hertz can also be represented as s-1.
Unlike wavelength, frequency is independent of the medium through which the optical wave travels. Frequency is unchanging in a photon or optical wave, though the wavelength will change depending on the medium, which gives rise to a variable phase velocity, even though the speed of light remains constant.