This instruction is used to compare things.
with testing for:
CMP A,B ; (A= destination, B=source)
we can get for example results like:
source is, less than .. greater than .. equal .. not equal Destination.
and depending on the result of this comparison,
we can decide to jump to some place or some other place in the code.
This 'jump' is called 'branching'.