Nonlinear optics is an essential component of modern laser systems and optoelectronic devices. It has also emerged as an important tool in probing the electronic, vibrational, magnetic, and crystallographic structure of materials ranging from oxides and metals, to polymers and biological samples. This review focuses on the specific technique of optical second harmonic generation (SHG), and its application in probing ferroelectric complex oxide crystals and thin films. As the dominant SHG interaction mechanism exists only in materials that lack inversion symmetry, SHG is a sensitive probe of broken inversion symmetry, and thus also of bulk polar phenomena in materials. By performing in-situ SHG polarimetry experiments in different experimental conditions such as sample orientation, applied electric field, and temperature, one can probe ferroelectric hysteresis loops and phase transitions. Careful modeling of the polarimetry data allows for the determination of the point group symmetry of the crystal. In epitaxial thin films with a two-dimensional arrangement of well-defined domain orientations, one can extract information about intrinsic material properties such as nonlinear coefficients, as well as microstructural information such as the local statistics of the different domain variants being probed. This review presents several detailed examples of ferroelectric systems where such measurements and modeling are performed. The use of SHG microscopic imaging is discussed, and its ability to reveal domain structures and phases not normally visible with linear optics is illustrated.