Refer to the Roles and Security documentation on Sitecore's site: https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/security_and_administration/users_roles_and_domains/the_security_roles
While it's not entirely clear from the question what your goal is, to grant a user permission to use Content editor and Media Library, they should be assigned the Author role.
Author
Gives the user access to content in the content tree. This role
provides access to basic item editing features, such as the Media
Library and the Content Editor, with a reduced set of tabs on the
ribbon.
This role also has two of the Sitecore Client roles as members, so if
you assign just this role to a user, the Sitecore Client Authoring and
Sitecore Client Users roles will be automatically assigned to the
user.
To access the View ribbon, they'll need the Sitecore Client Designing role. This role grants other privileges, however, that you may not wish the user to have.
Sitecore Client Designing
Gives the user access to Experience Editor
Design pane features that allow a user to set layout details
associated with items in the Sitecore client.
Once you've assigned these roles, you still need to set the security access rights on the home item and its descendants, as well as the media library. By default, no roles have write access to the content tree. You can, for example, grant access to the Home item and its descendants to open up access to the Sitecore Client Authoring role.