On the Payment Form there is a field called "Duplicate Subscription/Members" that has two values, Merge or Create New. Merge will merge any payments to an existing membership if there is enough matching criteria (name, email, payment form, etc). Create New will create a new membership, regardless of if the contact already has existing memberships.
If no value is selected, it will default to using the Merge behaviour.