When you merge a branch into another you apply both the changes done in the two branches to the final one.
In the picture example there is a merge of the changes in C4 and C5 resulting in C6.
It is a 3 way merging because it involves the common origin commit C3.
When you rebase a branch on another you apply the specific commit of the branch on the one you are.
In the picture example the changes in C5 are reapplied to the commit C4 resulting in C5.
The result of the two operations is the same.
The goal to use Rebasing is to have a cleaner history of the changes, as they appear executed sequentially instead of in parallel.
My 2 cent
Imagine this situation.
You have done 10 changes on a branch called “Create modal dialog for new Order”.
You rebase the commits of this branch on the master branch.
For the commit “Add form validation on save button click” how someone can understand which “save” button you are talking about ?
If the reabase put all the commits under the main branch how can I see the work done for a specific feature/bug ? Detaching the commits from a specific branch seems a loose of information to me.