Duplicate Management in Salesforce
Duplicate Management in Salesforce is very easy. You just have to create a Matching rule on your object which will decide the criteria to detect Duplicates. Then you have to create a Duplicate Rule on your object which will decide what actions to trigger when duplicates are found.
In Matching Rule you have to select the object on which you want duplicate detection, enter name for the rule, Unique name gets automatically filled up replacing spaces with Underscore character, you can give description for the rule after that and the most important thing is to select the Criteria for Duplicate checking i.e. which field/s need to be checked for duplicate values. You can also give and /or conditions with the criteria to meet your requirements.
eg. you can check if the FirstName and email Or LastName and email fields are duplicated inside Leads.
In Duplicate Rules you can select Record Level Security whether you want to Bypass sharing rules or you want to Enforce sharing rules. After that you can select Action on Create and Edit, whether you want to allow duplicates or you want to block them throwing an error. Along with this you can also do reporting on duplicates and throw error even after allowing duplicate creation. After this you need to select the Matching Rule for your Duplicate Rule.
You can also provide filter Criteria in you Duplicate rule which will check only those records which fall into this criteria for duplication.