Select a device from the list and remove it from the account.
Two-factor sign-in asks for a code on top of your password — a stolen password alone won't get in.
After signing out, change your password and turn on two-step verification (2FA) — otherwise an attacker can simply sign back in.
Ready
Apple Account opens in its own window, beside this one.
Why not inside this page? Apple Account, like every major platform, blocks its security pages from loading inside other sites — it's what stops fake look-alike pages from stealing logins. The window you open is Apple Account itself.