Contact records must exist before you import membership data. If you want to import membership data for contacts that do not yet exist in CiviCRM, you will first need to import the Contact data. Make sure the contact data has an External ID so you can include this External ID with your membership data to associate these records with the related contacts. If you are importing membership data for contacts that already exist, then you will need the Internal Contact ID or the fields from your Unsupervised Duplicate Matching Rule to associate the related membership data with the correct contact.
Your import membership data file MUST contain both Membership Type and Start Date. The membership types listed must exactly match the membership types set up by your CiviCRM Administrator. The start date should use the date format specified for your CiviCRM installation. If your import file does not contain these fields then you will not be able to import it.
You must import membership data for different contact types separately. Importing files with more than one contact type will not work. (You must import new memberships and renewals separately also.)
https://docs.civicrm.org/user/en/4.7/membership/manual-entry-of-memberships/