Ahh, "Suspension 101", maybe the most complex part of racing, or even luxury cars. First off, I strongly suggest you get some good books, because this can become incredibly complicated.
Everything goes back to one fundamental, to keep the rubber on the track, to maintain as good a contact patch under all conditions the car encounters. Nothing else matters, anything to do with the suspension serves that one purpose. Of course I'm talking about performance, because at the opposite end of the spectrum, for, say, a luxury car, it's built to keep the driver nice and comfortable and happy, removing harsh bumps and all the other bothers of the ordinary world.
Please understand I will oversimplify, because suspensions interact and the more you look, the more complex it is. The chassis and location of the suspension pivots and different parts of the suspension such as the uprights and arms, are designed to keep the contact patch on the track under varying conditions, such as bumps, cornering, acceleration, and braking.
In a perfect world we would have track surfaces as level and smooth as a billiard table. But there are dips, bumps, curbs, changes of elevation, you name it, the track throws it at the car. A wheel and tire is a glorified beach ball, and if allow to do so, would bounce, and bounce, and bounce when it hits a bump. But every time it bounces, the tire lifts off the road surface, and traction is lost. Now when a tire moves up, it compresses, and when it goes down, rebounds. This is where the shocks come in, controlling the compression, and rebound. The forces are different in each direction, and the shocks are designed so the they resist compression with a certain force, and rebound with another level of resistance.
The springs? Well, basically all they do is hold the car up. That's it, they just hold the chassis in the air. Please remember I'm oversimplifying, because there actually are complex interrelationships between all the componenets, but trying right now would give me a headache and make this post about five hundred pages long.
There's also suspension travel, how far the wheels are allowed to travel up and down. In a Formula One car that spends it's life on relatively level and smooth surfaces, the wheel travel can be two, three inches. Almost a go-kart. But in the normal roads where curbs and bumps exist, the suspension must be allowed to deal with these hazards, else the suspension would bottom out, or the chassis would contact the ground. Very uncomfortable, and it would have an adverse affect on, yup, the holy grail, contact patch.
So a road car has a lot of travel and low compression and rebound on the shocks, because it is designed to travel the bumps and crap without the wife spilling her coffee. But in racing, driver comfort really doesn't matter, all that matters, here we go again, that magic contact patch.
Springs hold the chassis up, and the shocks control the compression and rebound of the wheels relative to the chassis.