Shocks, or shock absorber, is any device that dampens energy, in a vehicle's case, damping the feedback from the road/ground as it gets transferred to the vehicle. Once the road energy hits the vehicle through the tires, a shock needs to keep the tires planted on the ground as much as possible, while also controlling body roll.
Shocks are extremely important for ride quality and safety, but not an integral part of the suspension, since the vehicle is usually being supported by coil springs or leaf springs. While technically you can remove the shocks from your vehicle, a shock-less vehicle should only be driven in an emergency.
Struts, also shock absorbers, serve a dual purpose besides dampening road forces. A strut will also hold the coil springs, which supports the vehicle's weight along with shock duties. As the road feedback hits the tires, this energy gets transferred to the coil springs, and then the strut (shock absorber) dampens these forces to control the vehicle's movement after energy has transferred through the spring to the vehicle chassis.
Struts are integral to the vehicle suspension, without the struts and the matching coil springs, the vehicle would be immobile, as there is nothing to hold the weight of the vehicle since the springs would have no home in the suspension without a strut.
Coilovers are similar in nature to struts, in doing double duty of dampening through the shock absorber in the middle of its body, and housing the coilsprings, all as a single unit that works better together than as different pieces. Coilovers are typically reserved for performance level vehicles, where height or dampening requirements call for a more finely tuned setup. A coilover combines the abilities of a strut, with the damping of a shock, and allows the entire assembly to be installed as a single unit, rather than tearing down the vehicle's coil springs, mounts, struts, etc all separately.
Coilovers allow height adjustment, whether lifting or lowering the vehicle, depending on application. This could mean lowering for a street vehicle to lower the center of gravity in order to meet the demands of the driver (KW, Eibach, ProTune, Ksport). Light duty trucks and off-road race vehicles will typically use coilovers to lift the vehicle to accommodate larger tires, or heavier equipment (King, Fox, Icon, etc).