When you link your Windows user account to your Microsoft account, the Window user profile always matches the Microsoft account password. Changing the Microsoft account password changes the password for all Windows user profiles linked to it.
The check happens at login time. If the machine is online it checks your password against Microsoft's servers; if the machine isn't online then that check can't be made and Windows falls back on using the last password you've used.
The computer can be offline for a number of reasons, obviously. If you can't login and the computer just can't pick up the wireless signal, connect it physically to the internet with an ethernet cable using a router connected to the internet with DHCP — or use one of the classic password recovery strategies.
As I write this I realize that theoretically this means changing the hosts file to mask the Microsoft password authentication server with another malicious host might theoretically be enough to lock you out of your computer. Obviously, however, you need root to do this — and if an attacker gets root it's game over regardless of whether your account is linked to a Microsoft Account or not. If you're using UAC at the maximum settings (the only sensible settings) then you should be okay.