gun
rivets
Its very simple. Drill the correct size hole in your material, push the fat end of the rivet through the hole, insert the skinny end into the rivet gun and squeeze the gun. The shaft of the rivet will flare the outer sleeve on the back side of the material as it is pulled through the sleeve until the "right amount of resistance" occurs at which point the shaft of the rivet will snap off resulting in a fastener that is nearly flush with the outer surface.
Like
@huntsman22 said, there are different size rivets and rivets that are made of different materials based on your application.