NAT is not a firewall technology (however is often used in-conjunction with a firewall device). NAT routers are not firewalls as such.
Hardware firewalls can filter both inbound and outbound traffic, can filter based on source and destination (both IP and port), can filter packets based on the data they contain and based on there type.
The main difference between a hardware device and a software device is that a hardware firewall is a dedicated physical solution that provides these functions.
Hardware firewalls can be small SOHO devices or large corporate level devices such as the Cisio PIX, MS ISA or Checkpoint.
Back to NAT for one moment.
NAT does provide a degree of protection but it is totally wrong to call it a firewall, its not IMO.
The primary purpose of NAT is to provide internet connectivity for multiple users using a single connection due to the way it operates in certain implementations NAT gives the added bonus of not allowing unsolicited data in, that is anything your computer did not request.
NAT however will forward any and all data back to your computer but wont. send you anything you did not ask for. This gives you a clear view that it is not a firewall, it does not care what it sends you, a firewall does.
For more info see
here and
here