Automated robocalls which, for commercial purposes are illegal, are the number one consumer complaint reported by the public to the Federal Trade Commission (FTC). The ease by which illegal robocalls may be made by computers accounts for much of the problem.
Recently the FTC announced a new initiative by which it is asking consumers to file complaints with the FTC when they have been called by a robocaller and to report the number used by the robocaller. This helps us all because many of the call blocking solutions used today depend upon blacklisting specific telephone numbers known to have been used to make robocalls. Here is a link to where you can file such a complaint if you have received an illegal robocall.
There are a number of options for preventing robocalls including a number of apps that for free or a small fee will prevent robocalls. Here is a link to those for Android phones.
Here is a link to apps to prevent robocalls for iPhones.
For landlines, Nomorobo offers its robocall blocking for free. Here is a link to Nomorobo. I have used Nomorobo for years and find it to be tremendously useful
Finally, you can just choose to ignore any calls that come from numbers you do not recognize. If they are legitimate calls, they will leave a message and you can call them back.