How to display some of images from media library?

You can use the get_posts to fetch attachments from the database. Here’s some sample code to get your started. You can put it inside any template file inside your theme.

    $attachments = get_posts( array(
        'post_type' => 'attachment',
        'posts_per_page' => -1 /* get them all */
    ) );

    if ( $attachments ) {
        foreach ( $attachments as $att ) {
            $url = wp_get_attachment_url($att->ID);
            echo $url;
        }

    }

Check out the link for more parameters you can shape your query with.