OK.
I work in industrial brewing packaging.
Two types of pasteurisation: flash past and tunnel past.
Flash pasteurisation is where it's heated rapidly to about 70-80 degrees and kept there for a few seconds, and then cooled. This all happens in a large heat exchanger that's sort of the opposite of a wort cooler. Flash pasts typically are placed on kegging lines, but are also common on European bottling lines. It has the advantage of not losing as much aroma as tunnel pasteurisation. Problem is, since you're pasting before filling, you need an expensive sterile filler.
Tunnel pasteurisation occurs after the bottles/cans are filled (does not happen on kegs for obvious reasons). They all enter a large tunnel where water of varying temperatures (depending on the position) is sprayed onto them. They endure a lower but longer pasteurisation which tends to affect aroma etc more. The advantage is that you don't need a controlled environment filler, as any bugs picked up along the filling process are killed.
Since pasteursation occurs at the packaging stage, it of course occurs after any conditioning/lagering/aging processes.
The only reason pasteurisation is used is to lower the overall cost. It's not strictly necessary to do, however, means you can save money by not needing to control sterility as much. If you think controlling infections in home brew is difficult, think about how hard it is in large, complex pipelines, valve matrices and packaging machinery.
Typically, craft brewers don't pasteurise. It's not a requirement, but it does make sense economically for large brewers.