logoutOtherDevices invalidates all other sessions for a user account. There is a video on this here at Laracasts https://laracasts.com/series/whats-new-in-laravel-5-6/episodes/7
If you take a look at the function itself in the laravel/framework repository you can see more of what it does:
https://github.com/laravel/framework/blob/8.x/src/Illuminate/Auth/SessionGuard.php#L642-L658
- Check if there is a logged in user
- Rehashes the users password
- Checks if the cookie needs to be queued or not to be updated
- Fire the event
OtherDeviceLogoutfor the specified user
So by rehashing the users password and updating the current users cookie session ID, you invalidate the other logged in users sessions forcing them to login again.