Agitation is about using the nature of how the chemicals interact with the film. The chemicals that work on the film are the bits of the fluid that are at the surface of the film - the body of fluid that's, say, a few millimetres away has very little effect. As the chemical at the surface works on the film, it becomes exhausted and stops working. When we agitate, the exhausted chemical is mixed with the relatively-unused body of the chemical, with the result that mostly-fresh chemical is now at the surface and starts working on the film. After each agitation, the overall body of chemical gradually becomes slightly more exhausted - it's a mix of the unused body of liquid and the exhausted stuff that was at the surface of the film before each agitation step.
Film develops differently depending on whether a particular area is dense or thin - highlights or shadows. The more dense an area is, the quicker the developer at the surface of that area becomes exhausted. When an area has been fully developed (all exposed silver halide has been converted to metallic silver), it won't develop any further, even if fresher developer is placed there through agitation. Sometimes, development of the dense areas is controlled such that they may not be fully developed at the end.
Shadow areas are less dense and will readily develop fully, even if agitation is relatively infrequent, because the developer in those areas takes much longer to become exhausted.
Highlight areas can be very dense - lots of exposed silver halide to convert to metallic silver. This means that the developer at the surface can become exhausted quite quickly.
Agitation, therefore, is primarily about controlling development of the highlights. If you agitate less, the developer becomes exhausted in those areas, stays exhausted for longer, and the highlights develop less - they come out less dense because less halide has been converted. Since the shadows will likely still be fully developed, the overall result is a negative with less contrast - less difference in density - between shadows and highlights. Similarly, more frequent agitation will result in more complete development of the highlights, giving a negative with increased contrast or density range between shadows and highlights. At a certain point, there is 'enough' agitation, such that the highlights are developed fully.
It should be borne in mind that not agitating at all does not result in non-development of a dense area once the developer at the surface has become exhausted. There is still a low level of replenishment because the molecules in liquids are still in motion even if the tank is not being moved. The rate of development becomes much slower because the rate of replenishment is much slower compared to agitation (this is why stand development takes so long).
I've not heard of agitation during fixing affecting contrast. The purpose of fixing is to dissolve the unexposed silver halide (which looks cloudy). If anything, insufficient fixing would leave some of this behind, resulting what would amount to lower contrast, but this would be considered a processing fault, and not something that is desirable. The remaining halide would gradually darken or otherwise be affected by light, causing deterioration of the image (which could be remedied by fixing the film again). The purpose of agitation during fixing is similar to developing - the fixer at the surface becomes saturated with dissolved silver halide and becomes less effective. Agitating spreads the halide-saturated fixer into the body of the liquid, allowing fresher fixer to work on the surface.
So, the basic two things to grasp are...
The chemical reaction between film and developer occurs at the surface of the film.
Chemicals at the surface can become depleted, and agitation replenishes the developer at the surface, allowing the reaction to continue.
As a consequence of this, each solution becomes weaker, more depleted, less effective - more contaminated with reaction products - as development proceeds. Each agitation mixes some depleted chemical with the body of the liquid that's relatively good. In other words, your developer, fixer, etc is less effective in the last minute compared to the first minute.