If you purchase a handgun, it will have to be from a dealer with an FFL. He will then have to ship it to an FFL in your state of residence, who will then have you fill out the 4473 form and pay a transfer fee. By the time you add on shipping and the transfer fee to the local dealer, it probably won't be worth buying a handgun even if you find it at a good price. The transfer fee can be whatever your local dealer wants to charge, so sometimes it's worth shopping around. Pawnshops often charge lower prices than full-service gun stores. Expect at least $25.
You can use the show as a chance to handle a variety of handguns and see what fits you best, see how prices are running, and then find the same model from a dealer (or private seller) in your state.
You can purchase a shotgun or rifle (long gun) from an FFL at the show, if said dealer will sell to an out-of-state resident. Some will and some won't. It is legal, but the dealer has to follow the laws of both his state and the buyer's state, and some don't want that hassle.
You CANNOT purchase any firearm from a private seller since you are not in your state of residence, unless you arrange for the seller to ship the gun to a FFL in your state. At that point, you are again adding on shipping and transfer costs so probably not worth it.
The "gun show loophole" is a political term that is part of an effort to abolish the private sale of firearms. It would require all sales to go through FFLs. Some gun shows already have this requirement, some don't. It depends on the state and the promoter. Depending on your state, it is legal to pay somebody for a gun and buy the gun with no paper work. It doesn't matter if this happens at a gun show, parking lot outside the gun show, or at his/your house.