A rivet gun, or riveter, is a tool used to install rivets, which are permanent mechanical fasteners. It works by placing a rivet through a hole in the materials to be joined and then compressing or driving the rivet's tail end to form a secure, permanent connection. There are three main types of rivet guns: manual, pneumatic, and electric, each offering different power sources and applications.