A straw purchase is any purchase in which a second person agrees to acquire a firearm for someone else. This is not the same thing as purchasing a firearm as a genuine, bonafide gift. It is legal to purchase a firearm as a gift for another, since you are actually buying the firearm for yourself to gift to another. However, it is illegal to purchase a firearm posing as the real buyer for someone else. If you do, it is called a straw purchase because the person posing as the buyer likely has a clean background and is doing so on behalf of another, often because that second person may not pass the background check.
A purchaser of a firearm from an FFL who lies on the Federal Form 4473 about the identity of the ultimate possessor of the gun can be charged with making false statements on a Federal Firearms Transaction Record. Lying on this form is a felony and can be punished by up to five years in prison in addition to fines, even if the transaction is denied by the National Instant Criminal Background Check System (NICS).