If we enable duplicate detection rules then we can set it either to not allow duplicates or allow but only prompt of duplication.
If any duplicate records detected system will prompt as per below snapshot. user can click on Ignore and Save to continue saving the record.

Merging:
If user wish to merge the record need to select more than 1 record to enable the Merge button.

user can select primary record with which other record will be merged as per below snapshot.

When user clicks on OK the record will be merged Primary record will be retained whereas secondary record will be deactivated.