Hello,
You mean transfer the drive to another PC?
It does work, I've done it many times between my PCs.
...However, problems can arise when chipset drivers and hardware drivers that are installed on that specific hard drive cause a conflict because obviously, the hardware is no longer there in the new machine. You might then experience BSOD after POST and occasions where the system refuses to boot into Windows.
It's strongly not advised, because the particular copy of Windows will not have the required drivers, and or be configured to operate optimally in that machine (for example, it may have less RAM and a different GPU).