Here's how it works:
You go to a website to sign on. Yahoo, for instance.
After entering your username and password, this is sent to the Yahoo server which checks to see if the password is correct. If so, it sends you a 'session cookie'. This is a little file that sits on your computer (totally harmless), containing your username and some information to say that you are signed in. Probably also a date and time that the cookie is no longer valid for (typically 2 weeks, perhaps).
If the website wants to make sure you are signed in to do whatever you want to do (delete an email or something), it can now quickly check some data it's temporarily stored for you on the server, with the information in your cookie. If they match (and it's next to impossible to fake), then it means you're singed on, so it'll delete the email. If something goes wrong, or the cookie becomes out of date, it'll ask you to sign in again.
Now, using the same account on more than one machine is dependant on the website. But most popular ones will allow this, storing the state information in the cookie and on the server, for as many computers as you like.
So it can check that one computer is signed in. If you go to another computer and sign in, this computer will get a different cookie, with slightly different information. This is then fine to use on that computer to show that you're signed in.
Two computers can be using the same account at the same time. It's nothing to do with you seeing their cursor move about on your screen or anything like that. What you will see though, is updates to the server-stored information. If someone else uses your account and deletes an email, then when you next press refresh on the email page (or just load that page), the email will be gone. All either computer is doing is accessing certain operations on the server. These updates can then be seen by any computer accessing that