Once you realize it’s a robocall, hang up immediately and don’t say anything. The goal with a robocall scam is to extract as much information about you as possible, so the less you say, the better.
Some robocalls may ask you to follow commands by asking you to push buttons. This is a tactic to prove the number belongs to a human being and your number may be sold and result in even more spam/robocalls.
If the robocall leaves a voicemail asking you to call back, even if you think it’s a legitimate message, such as the pharmacy calling to let you know they have a question about a prescription, find the number and call them back directly yourself.
If you are able, report the number that called you so it can be marked as spam. Calls can be reported to FTC online or by calling 1-877-382-4357.