A branch is actually a pointer that holds a commit ID such as 17a5.
HEAD is a pointer to a branch the user is currently working on.
HEAD has a reference filw which looks like this:
ref:
You can check these files by accessing .git/HEAD
.git/refs
that are in the repository you are working in.