With the Windows 10 Anniversary Update, Cortana is now enabled by default on your lock screen–assuming you haven’t disabled her entirely. If you’d rather not have Cortana answering questions when your PC is locked, it’s an easy enough feature to disable.
Open Cortana by clicking the Cortana button on your taskbar, hitting Windows+S on your keyboard, or just saying “Hey Cortana” if you have that enabled. When Cortana is open, click the Settings button.
On the Settings page, scroll down and turn off the “Use Cortana even when my device is locked” option.
Note that there’s no way right now for PC users to access Cortana on the lock screen except by saying “Hey Cortana” into a microphone. There’s no Cortana button you can click. Mobile users can hit their Search key to start her up, however. Also, Cortana can reply to many requests–like playing music or answering basic questions–right from the lock screen. However, if you ask Cortana to do something that involves settings or an app, Windows will ask you to sign in before Cortana can complete your request.