The pack.mcmeta file is the identifying file used by texture packs on Minecraft Java Edition.
On this page you'll find an example of the file you can copy & paste into your own pack, and a full description of how the file works.
Important: if you're visiting this page due to issues with your pack.mcmeta file, I recommend visiting the Pack Fixer which automatically fixes common issues with texture packs (including mcmeta files).
Anyways, we'll start off with the file itself: (pack.mcmeta)
{ "pack": { "pack_format": 1, "description": "desc" } }
Just an fyi: this is the most simple version of this file (and is also all that's needed for 99% of users).
Before starting off it is important to note that this file must be in the mcmeta file format, the easiest way to make one of these is right click inside of your texture pack, select "new", and choose "text document". Once you've added the desired content (above) you can rename the file from new_file.txt to pack.mcmeta.
If you need a txt to mcmeta converter, visit This Page
Now, an explanation of the elements in the default pack.mcmeta file:
pack_format, the format version of your texture pack, which tells Minecraft the intended game version(s) for your pack. To find the corresponding values for each Minecraft version visit This Wiki Article. Alternatively use the Texture Pack Version Converter to convert your texture pack to ANY Minecraft version!
description, add a description for your pack in between the quotation marks, this will show up inside of Minecarft.
If you need help making your own Minecraft Texture Pack, a full tutorial can be found here :))