Hit post before I'd finished
Two ways you can deal with it yourself (the third is to take it to the dry cleaners).
If you can soak it; then soak it overnight in loads of cool water with a tiny squirt of fairy liquid in it, or shampoo. That ought to loosen any grime that's trapped in the fibres. Next day, gently rub at it inside and out with a sponge (not the green scourer-y bit just the sponge side). Then soak it again in clean water, and again in another clean water soak.
You might need to support it to let it drain and dry down….blow up a balloon, or make a head shape out of newspaper and change it frequently as it soaks up the water.
Felt hats can (and were) ironed to smooth surface fibres and re-shape things, but it's a skill and, well, that's up to your own good sense, iimmc
The other way, much simpler, but not a deep clean, is to use a basin of lukewarm water with some ordinary soap or shampoo in it and an old towelling flannel, and literally just keep wipeing and drying until you've cleaned the whole hat. A soft clothes brush will help at the end to restore the finish.
Not so likely to remove sweat stains, salt marks or grease as the first method, but much easier to repeat as necessary
If you really want to waterproof the wool, then a lanolin (or one of the modern nikwax wash in mixes) soak/rinse as part of the whole soak it to clean it process, will do wonders.
Best of luck with it
atb,
M