Original firewall technology made security decisions on only packet sources and destinations. These network firewalls were referred to as packet filters. Because they made very simple decisions, these firewalls were fast, but not very secure.
The second generation of network firewalls were application layer gateways, or proxy servers. Proxy servers completely disassembled all network communication passing through them and were able to make advanced decisions about the security of a given connection. This made them very secure, but also very slow.
Stateful inspection is the third generation of network firewall. It combines the speed of a packet filter with the security protections of an application layer gateway. Today almost all enterprise-class firewalls utilize some form of stateful inspection technology.