First of all, if you upgraded to Windows 10 from a previous version of Windows (Windows 7, 8 or 8.1) or if you installed Windows 10 using a Windows 7, 8 or 8.1 license key, then your Windows 10 license is tied to this hardware and cannot be transferred to a new motherboard/processor combination. In this case, you will need a new Windows 10 license key (or another Windows 7, 8 or 8.1 license key) in order to activate the installation on the new motherboard/processor combination.
If, on the other hand, you installed Windows 10 from scratch with a proper Windows 10 license key or your PC came from an OEM with Windows 10 preinstalled, then you can transfer this license to a new motherboard/processor combination. In order to ensure that this happens, you first need to make sure that you have logged into a Microsoft account (Outlook.com, Hotmail.com, etc.) from Windows 10 before touching the hardware. This creates the digital entitlement needed. Then, after you replace the processor and motherboard, logging into this account will automatically transfer the digital entitlement to the new hardware and activate Windows 10.
Regardless of anything else, make sure you do a full backup of your installation before you start the hardware upgrade process.
Hope this helps,