It's very easy to understand.
Item tags are basically like hidden save variables.
You can set them like variables, so "/item tag set test 1"
You can read them using the variable GetItemTag block, so input "test" and the item you're reading
The code will output "1" because we set the tag to 1
If we did "/item tag set test hello" instead, then the code outputs "hello"
You can set tags using the variable SetItemTag block, read the lore of the icon for more information.
Oh and also, items with different tags won't stack.