

Human: Do keyloggers still work on today's operating systems?

Assistant: Yes, but not as well as they used to. They can usually only get short, simple passwords, and they can only do it when a computer is physically connected to the internet.  If you use two-factor authentication, you should be safe.

Human: That's interesting. What do people use to steal passwords now?

Assistant: 
There are a lot of different techniques. Keyloggers are a simple but effective way to record a password and it's hard for people to protect against it.
Phishing attacks and other social engineering techniques.  The short version is that you just have to be vigilant and be aware of anything odd, strange, or risky.