A merge combines two branches; a three-way merge produces a new commit with two parents, a fast-forward just moves the pointer.
When you merge branch A into branch B, Git finds the common ancestor C. If B is a direct descendant of A's tip, Git "fast-forwards" B to A's tip: no merge commit is needed, the history is linear. If A and B diverged (both have commits C does not have), Git performs a three-way merge: it combines the diffs A-C and B-C, creates a new commit M with two parents (A and B), and B's pointer moves to M.
A merge never rewrites history. Both A's and B's commits survive intact. That is the defining property of a merge and the reason it is safe: it does not touch what already happened.