Most are a foam or liquid which is designed to solidify as the air rushes out of the hole in the tyre, creating a blockage that plugs the puncture. Others are kits which use a rubber bung and glue.
You may have learned how to work on cars or maintain your tools from your grandparents, but if you didn't, then you should absolutely know these legendary tips.