Firewalls block all unauthorized connections to your computer (including those of hackers who are trying to steal your data) and even let you select which programs can access the internet so that you're never connected unknowingly.