Heavily dirty grout requires a fair bit of work to get it cleaned.
I would start out with a heavy duty grout cleaner like Aqua Mix Heavy duty tile and grout cleaner. This is non-acidic and should be the first step. This also requires a fair bit of scrubbing. I have some scrub brushes that I attach to my drill but I also spend a fair bit of time with a hand powered brush as well. This should get the grout pretty clean and get most of the soiling off the grout. After this step it is important to really flush the floor with water, this means mopping with clean clear water, wetter than normal to really rinse off all the residue and cleaner.
If the grout is looking pretty good then the next step would ideally be a good steam clean. This should loosen up any remaining gunk.
If the first clean didn't get it looking pretty good you could go to steam and try but that can sometimes force stuff deeper into the grout. This step involves using an acidic cleaner. Its important to remember that acid eats cement, so work small areas and flush clean after to remove the acid. Aqua Mix makes an acidic cleaner, there is also a Zep Grout Cleaner and Brightener that works well. With all these cleaners, really be careful with fumes, keep good airflow, cover eyes, wear gloves, etc.
This should clean things up, sometimes it takes a few rounds of step one. Remember that your grout didn't get this way in one day, so getting it back is gonna take some work.
Once you get it clean its a good idea to seal it and then consider your plan for upkeep and maintenance, which is a whole other discussion. Multiple ways to go with sealer.
Pros that come in and do the steam cleaning are just using more expensive equipment than the average person will have.