How does Riot know when someone is account sharing?

I started playing lol this year on february if I remember correctly. When summer started and my session in university ended I went to countryside and played on a different pc and different ip. When summer ended I came back home and started playing on the previous pc and ip. I have seen posts about people being banned for account sharing, but how they can tell whether I gave my account to someone else or I just moved somewhere else and just played on a different pc and ip? Don't get me wrong, I am not banned or anything, just wondering how they figure it out.
Report as:
Offensive Spam Harassment Incorrect Board