Generally, this issue occurs when the IP address assigned to your computer changes relatively frequently. This most commonly occurs if you use a wireless network, a mobile hotspot, or if you are roaming between different networks.
If you are connected directly to the modem, this should not normally occur. Some internet service providers (ISP) do provide Dynamic IP addresses but the IP address should only change when you disconnect and reconnect to the internet (Most commonly, this happens when you turn your computer off and then back on).
It's also possible that you experienced a brief interruption in your internet connection/service and when the computer reconnected your Moodle session hadn't timed out. In that case, the back end is still holding the original IP address from the beginning of the session and then it sees that your IP address has changed (when your ISP assigned a new address to it), which in turn generates the error. Unfortunately, at that point, the only thing to do is let the session completely time out (which could be as long as 2 hours). Once the session has timed out, you should be able to log back in without any errors.
If your internet service seems to be stable and steady, you may want to contact your Internet Service Provider directly and see if they can investigate why the IP address they are assigning you is changing so frequently.
If the IP address issue is persistent, and it is not something happening on the ISP or network end, it may be due to a more serious issue. There could be a corrupt element in the operating system or a bad NIC card.
If the issue is not persistent, I suspect that you experienced a brief interruption in internet service along the previously described lines.