I don't live in the US, but I have come across the FFL thing several times, and I've always had a problem understanding the purpose of it...
In the U.S. law, firearm transactions must comply with both federal (national) law and state law.
In the U.S., per federal law, you can go to a dealer (FFL) in your own state of residence, see a gun you like, pay for it, undergo an instant "background check" (via the NICS system) and then take the gun home if you pass.
There are basically 4 outcomes to the NICS check:
Proceed--allow the sale to continue without delay.
Denied--the sale is disallowed.
Delayed Proceed--the purchaser must wait 3 business days to take delivery of the firearm.
Cancelled--not enough information provided. The check must be run again with more information provided or the sale can not proceed.
In a number of states (states that issue permits to carry that qualify under federal law), if you have a permit to carry a handgun, federal law allows you to bypass the NICS check because your permit constitutes a background check.
Some states do not issue qualifying permits, and some states may impose other restrictions such as waiting periods or such as requiring a license before a firearm can be purchased. In most states a license is not required to purchase a firearm.
Per federal law, if you want to buy a gun from a resident of your own state, the two of you can perform the transaction without any need for a dealer to be involved. Some states have laws that do not allow this.
If you want to buy a firearm from out of state, a dealer (FFL) must be involved since transfers of possession across state lines (other than bequests) must involve an FFL per federal law.
It's legal to ship a firearm to a person in your own state per federal law, but it can be complicated to comply with the laws and the shipping company policies. Somes states have laws that do not allow this.