Covalent molecules come in all shapes and sizes, depending on pairs of electrons in the outer shell, which repel each other due to their negative charge.
Pairs not shared with another atom (‘lone’ pairs) will repel other pairs of electrons more so than pairs covalently bonded to another atom (‘shared’ pairs).
A good rule of thumb is that the size of the angle between two lone pairs > a lone pair & a shared pair > two shared pairs.
Example 1: Ammonia (NH3)
There are four electron pairs in the outer shell: 1x pair not shared with another atom (a ‘lone’ pair) and 3x pairs covalently bonded to a hydrogen atom (‘shared’ pairs). Using our rule of thumb from above, the lone pair will repel the shared pairs (from a usual 109.5° by 2.5° to 107° if you want to be precise!), so we get a ‘trigonal pyramidal’ shape (trigonal = triangular, pyramidal = pyramid-like).
Note: many similar molecules have the same shape, e.g. PH3, SO32-
Example 2: Aluminium chloride (AlCl3)
There are three electron pairs in the outer shell, all shared pairs covalently bonded to a chlorine atom. As there is no lone pair, the shared pairs are not repelled beyond what you’d expect, so we get a ‘trigonal planar’ shape with 120o between the bonds (trigonal = triangular, planar = flat).
Note: many similar molecules have the same shape, e.g. BF3, BCl3, AlF3, CO32-, NO3-