How to display posts i grid photo

You need to build the query and then loop through it afterwards.

<ul>
<?php
//Your Args
    $args = array(
    'post_type' => 'post',
    'category_name' => 'featured',
    'posts_per_page' => 5,
    'post__not_in' => get_option( 'sticky_posts' )
    );

    // The Query
    $query = new WP_Query( $args );

    // The Loop
    while ( $query->have_posts() ) {
        $query->the_post();
        echo '<li>' . get_the_title() . '</li>';
    }
?>
</ul>

Then where the code echos the title, you would include your HTML to build your grid. And obviously have extra CSS elsewhere to style it as a grid.