All the roles you see out of the box are assigned automatically:
NotAuthenticatedUser - assigned to any request coming from a user who is not logged in
AuthenticatedUser - assigned to any request coming from a user who IS logged in
FacebookUser, TwitterUser, GooglePlusUser - assigned to any request coming from a user who logged through a corresponding social network.
SocialUser - assigned to any request coming from a user who logged through a social network.
AndroidUser - assigned to any request coming from a client which uses the Android secret key
IOSUser - assigned to any request coming from a client which uses the iOS secret key
DotNetUser - assigned to any request coming from a client which uses the Windows secret key
JSUser - assigned to any request coming from a client which uses the JavaScript secret key
RestUser - assigned to any request coming from a client which uses the REST secret key
ASUser - assigned to any request coming from a client which uses the ActionScript secret key
ServerCodeUser - assigned to any request coming from a client which uses the Server Code secret key
To assign a user to a custom role, you must use the following API (MUST be executed from the server-side code):
https://backendless.com/documentation/users/rest/users_user_roles.htm
https://backendless.com/documentation/users/android/users_user_roles.htm