You were hacked from clicking links (MSN in 99% cases)
You should have an antivirus (Avast recommended - free and updates in time)
Scan the computer, antivirus will catch the file (such "hacks" via links - the easiest way for him) and block it (remove, waste, whatever)
Change passwords and email if still need accounts...
And on future - if you have no antivirus do not click the strange links or links you are not sure about...
And do not use the same password for all accounts... So if some password they got, they could not get other...