Firewall is just like the traffic controller for the incoming and outgoing data packets. To understand we can imagine a traffic system where the licence of the vehicles are checked and only valid licensed drivers are allowed to go just like that the trusted ip servers who are having their security certificates are allowed to go and rest are get blocked just because to protect the service holders or clients from getting attacked by the malware and virus programs.
In case of home pc if firewall is turned on then the security checking would be like the checking of the server as well as the websites i.e. the security certificates of websites that the client requests is also getting checked.
In case of first version of firewall the security checking was only for the data packets checking.
In second version the idea was get modified a little bit more and the data packet sent are checked for the security certificate for the encrypted authentications.
In third release the security get check on the basis of the all the second release checking along with the MAC address of the sender and receiver are get checked and the application layer get involved which has the benefit to check the FTP,HTTP which enables the blocking of unwanted protocols if encountered.