If you answer the phone and hear a recorded message instead of a live person, it's a robocall. You've probably received robocalls about candidates running for office, or charities asking for donations. These robocalls are allowed. But if the recording is a sales message and you haven't given your written permission to get calls from the company, the call is illegal. In addition to the phone calls being illegal, their pitch most likely is a scam.
If you get a robocall, hang up the phone. Don't press 1 to speak to a live operator and don't press any other number to get your number off the list. If you respond by pressing any number, it will probably just lead to more robocalls.
about Robocalls and how to protect yourself, from the Federal Trade Commission.