Mucky and muddy describe having a lot of wet soil or dirt. Water can be said to be muddy, as well as ground and people.
Dirty can be any dirt and any degree. If I have a slight amount of dirt on my pants, they would be dirty, but not muddy or mucky. They would have to have a lot of dirt for that.
Filthy is used when something is extremely dirty. Filthy always means dirty. Dirty does not always mean filthy.
Also muddy and mucky apply to a particular kind of dirty - one the involves mud.