A handheld firearm that is not a handgun. Generally speaking, a long gun has a longer barrel than a handgun, a butt stock, and is fired from the shoulder.
Rifles and shotguns are (normally) long guns.
Use of the term “long gun” was reinforced and probably popularized by the National Firearms Act of 1934, which made a legal distinction between handguns and long guns, and stipulates minimum* barrel lengths and overall lengths. The term was further reinforced by the Gun Control Act of 1968, which sets different age limits for firearm purchases of handguns and long guns.
(* The reason for these stipulations is that the NFA was originally written to restrict handguns in the same way that it restricts fully-automatic firearms. The handgun restriction was ultimately removed from the bill before it could pass, but the language setting minimum barrel and overall lengths for long guns remained. This has created a legal zone of restricted firearms between handguns and long guns that serves no purpose, but which has nevertheless resulted in many prosecutions.)