Briefly speaking, a receiver is the part of the firearm which contains all the operating parts of the firing mechanism. This includes the trigger mechanism, the bolt mechanism, hammer, the part that holds the magazine to the firearm, the firing chamber etc. It does not include parts that are secondary to the firearm (e.g.) the stock, sights, gun sling, magazine, barrel etc. Think of the receiver as the parts of the firearm that are absolutely necessary to operate the firearm. It is called the receiver, because it "receives" the ammunition and fires it.
Per US federal laws, the receiver is considered the firearm and therefore, anyone purchasing a receiver has to undergo a background check and complete paperwork, the same as though they had purchased a complete firearm.
In the case of pistols and revolvers, in most cases, the receiver is housed in the firearm body or frame.
Parts of a pistol, including the receiver. Click on the image to enlarge.
In the above image, we see some parts of a pistol. The receiver is the major part of the body of the firearm, as it contains the trigger, hammer, firing pin etc. Of course, there are some exceptions: in some handguns, such as the Sig P-250, Ruger Mark I, Mark II and Mark III etc., the receiver is actually a separate part that can be detached from the body and swapped out.
With rifles, the situation is a little different and the receiver only constitutes a part of the firearm body. In some firearms, such as the M-16, AR-15, Heckler & Koch HK-416 etc., the receiver is actually in two parts, an upper part and a lower part. In such cases, US law (and some other countries) considers that the receiver part that has the serial # of the firearm stamped on it is considered the controlled part of the firearm (i.e. the part that needs background checks and paperwork to be done for a sale)
An AR-15 and its receiver. Public domain image.
In the above image, we see a complete AR-15 rifle and its receiver below. Technically, the AR has multiple receivers (an upper and a lower receiver) and the part we see above is the lower receiver part, but since the lower receiver has the serial number, it is considered to be the controlled part for legal purposes in the US.
In the case of other rifles, such as the FN-FAL and some other Heckler & Koch products, the upper receiver is the one that is considered the controlled part. Other rifles have only a single receiver part (such as bolt action hunting rifles or the AK family of rifles), so that is considered the controlled part.
When we say controlled part, this means the part that is monitored by law agencies of a country. In the US, this means that if a person buys a receiver from a licensed dealer, they have to undergo a background check, the same as the one they have to go through if they bought a complete firearm. However, if they bought other parts such as barrels, slides, magazines, sights etc., no background check is needed. Some people circumvent this check by purchasing a partially completed receiver (which is not considered a receiver technically and therefore doesn't need a background check and paperwork) and finishing the rest by themselves in a workshop. How much of the receiver needs to be complete before it is considered to be a receiver depends on the firearm model and the Bureau of Alcohol, Tobacco and Firearms (BATFE). The term "80% receiver" is often seen on internet forums (the notion being that if a receiver is 80% complete, it isn't technically a receiver), but this is just a marketing term and not a legal one. The BATFE decides on a case-by-case basis where the dividing line between a partially complete receiver and a complete receiver is. Some states may also enforce additional laws on top of the federal ones.
Note that all the above is per US laws only. Other countries may have different laws (for example, some European countries consider the barrel as a controlled part).