User Role Editor does not allow to delete WordPress built-in roles (subscriber, contributor, author, editor, administrator).
User Role Editor does not allow delete custom role if it is assigned at least to one user.
In order to delete a custom role:
1. If some user use this role, assign to him another role.
2. Use ‘Delete Role’ button at ‘Users->User Role Editor’.