Why is my portafilter leaking around the group head?
Almost always a worn or coffee-caked group gasket. Replace the gasket, which is a cheap part, and clean the group seat and portafilter rim while you have it apart.
The group gasket is a rubber or silicone ring seated in the group head that the portafilter rim presses against. Rubber hardens and shrinks with heat over months, and coffee grounds build up in the seat, so the seal stops being continuous and pressurized water finds its way out around the edge during the shot.
The first diagnostic is how far the portafilter handle travels. On a machine you know, the handle settles at a consistent position when locked. As the gasket compresses and wears, the handle goes further and further past centre. When it is noticeably past where it used to sit, the gasket is done, and that is often visible before any leaking starts.
Before replacing anything, clean. Take the portafilter out, run a group brush around the gasket and the seat, and scrape out the compacted grounds sitting in the groove. Wipe the portafilter rim itself, since grounds on the rim break the seal just as effectively as a worn gasket. A surprising number of leaks are solved at this step alone.
If it still leaks, replace the gasket. Gaskets are inexpensive, model-specific, and available in different thicknesses for common groups such as the 58 mm E61 style. Removing an old one usually means a gasket removal tool or a careful screwdriver and a bit of patience; the old gasket often comes out in pieces. Fit the new one squarely, replace the shower screen at the same time since you are already there, and expect the handle position to return to roughly where it was when the machine was new.
If the leak is not at the group, look elsewhere before ordering parts. Water under the machine can come from the drip tray, from the tank seal, or from a fitting inside. Water from the spouts between shots usually means the three-way valve is not releasing properly. Water dripping from the group continuously after a shot, rather than during it, is normal on many machines as the valve vents pressure, so do not chase a fault that is a design feature.