I have a business scenario where I need to build a salesforce app and make it available on play store so that any customer can download and use that.My doubt is if any customer downloads it then he should have the credential to login.how can they get user credentials to login?
Rolling up the details in comments here:
If you are building a custom application and hosting on play store which requires users to authenticate themselves before they can use the Salesforce features, then Yes, you will need the users to have credentials for this purpose. As for "how" can they get credentials, that needs to be created by system admins and shared with the users who want to use the app.
You can also customize the app to provide a self registration feature as when a user downloads the app, they can register themselves, instead a system admin providing them the access.
It all depends on what are your Business use case scenarios, but definitely there's a way to achieve what you need here.
If you are looking for portal self registration, you can find some pointers on the documentations.