Welcome to Tom's Hardware Forums,
Here's how that could work but I'll start by saying it won't be worth it. First you will need a retail version of Windows - not an OEM version - or one that came with your laptop. Then you can install the operating system onto the hard drive each time you move it from one computer to the other. An operating system hard drive will not simply 'plug and play' in another computer. You need a retail version since that allows for the system to be installed on any single computer at a time whereas the OEM/manufacturers versions are tied to the system they were originally installed on
IMO, it isn't worth it... most of the time