A many-to-many relationship can be created by using a junction object. A Junction object is a custom object that has two Master–Detail relationships.