Are gaming mods illegal?

not every one of them. If the developer accepts the mod it's legal (E.G. DoTa for Warcraft III: reign of chaos)