Here and in more details here, you can find a good description of the SAM/BAM standard and what all fields mean. There is also a page with predefined tags and it says how you can make your own.
Those starting with X,Y and Z are "reserved for end user" Maybe an intermediate program?
NM:i:1 Number of nucleotide differences
MD:Z:45A29 String of mismatching position
I don't quite understand when you say "tags in unique hit or multiple hits"
XT:A:U means unique and XT:A:R means repeats. What are the other X:?:? tags used. Please explain.