You'd have to go to those devices that you've logged into and manually logout. But logging into a new device should automatically kick those out anyway. So if this keeps happening, the question is...who else has your login info?
You're only allowed to connect to the game from one session at a time, so yes, if you log in anywhere, all other logins to the game will be terminated. And by all other I mean the one other place you could have been logged in, because it is impossible to have more than one login active at a time. At most, you could be logged in at one specific place, and then try to log in somewhere else. Doing so automatically kicks the previous one.
If you see this happening and you do not believe you are logging in on another phone, tablet, or PC, I would strongly recommend changing your password. Also, make sure you are not sharing your Google Play or Apple login with anyone else. If you game account is linked to those accounts, anyone else logged into your Apple or Google account could theoretically start your game without the need for a password, since the game account is linked to those outside accounts.