Windows has had the windows defender malware protection for sometime now. With the release of Windows 7, defender was known as a anti spyware protection tool and users were required to either install Microsoft security essentials or any other compatible third party anti virus application to protect your computer against virus attacks.
With the release of Windows 8, both Windows defender and security essentials were merged and released as a single solution against malware.
When you open the Windows defender on your Windows 10 for the first time it prompts you with the option of turning on against virus protection. Click turn on and click close.
Once its turned on, Windows defender would be ready to protect against spyware and viruses.
Furthermore, by visiting Settings ==> Update and security, additional configurations could be seen along with the details that defender is powered by real time cloud based protection.