The physical drive? Yes.
The OS on it? Maybe, maybe not.
Anyone that gives you a categorical YES is simply blowing smoke.
What OS is this?
What were the old parts?
There are generally 3 outcomes doing that.
1. It boots up just fine.
2. It fails completely
3. It boots up, but you find 'issues' later.
A full wipe and reinstall is always
recommended, often
required.
How to do a CLEAN installation of Windows 10
That's just for the operation.
Licensing/activation also comes into play.
If Win 10,
Read and do this before you change any parts:
https://support.microsoft.com/en-us/help/20530/windows-10-reactivating-after-hardware-change
http://www.tomshardware.com/forum/id-3164428/windows-build-1607-activation.html