Valence shell electron pair repulsion theory is used to predict the geometry of molecules by how many electron pairs and lone pairs are on the central atom. In order for valence electron pairs to be as far apart as possible, molecules adjust their shape.
A lone pair can change the shape of the molecule because although it is not bonded to another atom, the electrons are still there and they still repel the other electrons, causing a irregular shape when predicting the molecular geometry.
We can only use VSEPR to find the shapes of molecules, because ionic compounds form crystals with various lattice structures which is much more difficult to determine the shape. In this course, we will only look at the geometry of molecules.