Firewalls control the inbound and outbound traffic between computers or computer networks, typically in business you have a firewall between your LAN (local area network) and the WAN (wide area network, AKA the internet), the configuration of the firewall typically stops anyone on the internet from accessing protected resources on your LAN.
Firewalls will sometimes come with QoS (quality of service) rules which allows admins to priorities some traffic over others and so this may result in some people seeing faster speeds or slower speeds depending on who you are and what you're doing. Firewalls are often rated for a certain number of users or connections depending on their speed so replacing firewalls which are too slow with faster ones can often speed up your internet.