What should be the format for the csv file for user upload and where can I get it?
Go to the Site administration > Users > Accounts > Bulk user actions section.
In the Users in List section, add any user to export by selecting the user name in the Available box and clicking Add to selection. Then in the With selected users 'choose' drop box, select Download and then click Go.
Finally there is a Download page that displays. Click the Download in text format link as it s the csv
After downloading the file add new users in to the file and keep the order of the columns same as it is. Make sure the first column "id" is always empty as moodle automatically adds Id while uploading.