In order to login as a community user first you need to create a community in your Salesforce org.After creating a community you need to give permission to users in your org who can login in community. To allow an external user to access your community, add them to an account as a contact record and then enable the contact record as a customer user or partner user, depending on your business relationship.