Every vehicle has a combination of shock absorbers (or struts) and springs. The two assemblies work together but have different functions. Springs actually support the weight of the vehicle and also serve to cushion the ride, preventing jolts from pavement irregularities from making their way into the passenger compartment or cargo area, while the shocks or struts limit the vertical motion from the springs (as well as soaking up impacts from the road).
The terms "shocks" and "struts" tend to be used interchangeably since they both serve the same function, but there's a difference in the two designs, and each has its advantages and disadvantages. Let's explore.
The difference between shocks and struts is how the suspension has been designed. All vehicles will either have a shock or strut at each corner of the vehicle. Some vehicles will even use struts on the front and shocks on the rear. The biggest difference between shocks and struts is that a strut is used as an articulation point in the suspension where the shock is not. Vehicles that don't have an upper control arm will use a strut to act as the upper control arm and connect the knuckle to the vehicle. Vehicles that use an upper and lower control arm to position the knuckle (independent suspension) or rear axle (solid axle) will use a shock.
Shock absorbers are typically mounted between the upper and lower control arms in front and between the axle and frame in the rear. The valving in a shock absorber is designed so that resistance is stiffer in the shock's upward motion (extension) than in compression, since the compression cycle manages the vehicle's unsprung weight and extension deals with the vehicle's heavier sprung weight.
A mono-tube shock absorber consists of a steel tube with a piston and rod inside, with the piston compressing gas as it reacts to bumps and travels up and down in the tube. Twin-tube shocks feature two telescoping tubes, with a hydraulic fluid rather than a gas and a valving system that disperses the fluid to other chambers as the piston moves up and down. Typically, front shocks (and often rear shocks) are a "coilover" design, with the shock absorber mounted inside the coil spring.
Shocks improve road feel and handling properties, as well as improving ride quality. While shock absorbers have seen innovations with different materials, different valving designs, and even electromagnetic damping that can be adjusted on the fly, the basic design of shock absorbers has stayed the same for nearly 100 years.
MacPherson struts are the most common type of strut on today's vehicles. These struts actually combine the spring and strut assembly into one serviceable component. While the MacPherson strut design is most popular, there are vehicles that use a bare strut without the spring attached. This is very similar to what a shock setup looks like, but the difference is that the strut acts as the upper connecting point between the knuckle and vehicle.
The MacPherson strut was developed by GM as part of its "Light Car Program," aimed at rolling out smaller car models for the postwar years. Struts actually differ from shock absorbers in both design and function.
Struts are actually mounted to the steering knuckle itself and support the body, with a small coil spring atop the shock absorber component of the strut. It's a design that negates the need for an upper control arm, making for a more space-efficient setup (and one that's well suited to unibody construction rather than a body-on-frame design).
Here's a short video that illustrates how struts are mounted and how they perform.
The line from the top mount of the strut to the bottom ball joint actually serves as steering axis inclination. In other words, struts are pivot points that are integral to the vehicle's steering gear, as well as the suspension. It also means that an alignment will be necessary whenever MacPherson struts are installed, effectively raising the price of replacement.
The disadvantage to this is that vertical movement of the wheel will also result in a momentary camber change and a disruption of steering geometry. As a result, many MacPherson-strut-equipped vehicles may not handle as well as a double wishbone/shock absorber-equipped car. GM's "HiPer Strut" and Ford's "RevoKnuckle" designs have addressed this issue by separating steering dynamics from the up-and-down movement of the strut, improving handling and road feel and reducing the tendency to torque steer in front-wheel-drive vehicles.