user13544: I use Arena GUI together with stockfish in engine games. I want to download a 6-piece tablebase but that is just a lot of work (and perhaps unnecessary). If I download the tablebase (syzygy), does stockfish work with it or just waits for the board to have 6-pieces and then the tablebase makes its moves?
Here is what I mean in more detail
Stockfish working with the tablebase
I assume I have the following position:
(Note: currently I am not talking about the best moves, just an example)
[Event "Computer Chess Game"]
[White "Stockfish 8"]
[Black "Wais Kamal"]
[Result "1-0"]
[SetUp "1"]
[FEN "2k4b/3r4/8/8/1Q1q4/8/4R3/2KB4 w - - 0 1 "]

1. Qxd4 Rxd4 1-0

Stockfish consults the tablebase about what happens after Qxd4 Rxd4 (without continuing to evaluate the rest of the line). If this line is winning it goes for it.
Stockfish working alone
Stockfish continues to play the game until six pieces are left on the board, then the tablebase makes the moves.
Which one of these actually takes place?

user825: 
play the game until six pieces

Stockfish doesn't do that, that's not what tablebase is for. Briefly, tablebase boosts engine search well before six-men position reached on the board.
Let's do an exercise, add the board 5 pieces. Now you have 10 pieces on the board, and it's not something you can find in any tablebase. However, during the engine search whenever Stockfish trades down to 6 pieces, it can instantly use the tablebase information. The tablebase information gives Stockfish whether's the position is a win/loss/drawn without ever going down to anything like 5 pieces. Therefore, the search is faster and more efficient.
EDIT:
The relevant code is https://github.com/official-stockfish/Stockfish/blob/master/src/search.cpp:
// Step 4a. Tablebase probe
if (!rootNode && TB::Cardinality)
{
    int piecesCount = pos.count<ALL_PIECES>();

    if (    piecesCount <= TB::Cardinality
        && (piecesCount <  TB::Cardinality || depth >= TB::ProbeDepth)
        &&  pos.rule50_count() == 0
        && !pos.can_castle(ANY_CASTLING))
    {

TB::Cardinality is by default 6. Stockfish checks how many pieces, if it's no more than 6 it consults the tablebase information. Otherwise, regular search. 

13544: <p>I use Arena GUI together with stockfish in engine games. I want to download a 6-piece tablebase but that is just a lot of work (and perhaps unnecessary). If I download the tablebase (syzygy), does stockfish work with it or just waits for the board to have 6-pieces and then the tablebase makes its moves?</p>

<h1>Here is what I mean in more detail</h1>

<h3>Stockfish working with the tablebase</h3>

<p>I assume I have the following position:</p>

<p>(Note: currently I am not talking about the best moves, just an example)</p>

<pre><code>[Event "Computer Chess Game"]
[White "Stockfish 8"]
[Black "Wais Kamal"]
[Result "1-0"]
[SetUp "1"]
[FEN "2k4b/3r4/8/8/1Q1q4/8/4R3/2KB4 w - - 0 1 "]

1. Qxd4 Rxd4 1-0
</code></pre>

<p>Stockfish consults the tablebase about what happens after Qxd4 Rxd4 (without continuing to evaluate the rest of the line). If this line is winning it goes for it.</p>

<h3>Stockfish working alone</h3>

<p>Stockfish continues to play the game until six pieces are left on the board, then the tablebase makes the moves.</p>

<p>Which one of these actually takes place?</p>
 825: <blockquote>
  <p>play the game until six pieces</p>
</blockquote>

<p>Stockfish doesn't do that, that's not what tablebase is for. Briefly, tablebase boosts engine search well <strong>before</strong> six-men position reached on the board.</p>

<p>Let's do an exercise, add the board 5 pieces. Now you have 10 pieces on the board, and it's not something you can find in any tablebase. However, during the engine search <strong>whenever Stockfish trades down to 6 pieces</strong>, it can instantly use the tablebase information. The tablebase information gives Stockfish whether's the position is a win/loss/drawn without ever going down to anything like 5 pieces. Therefore, the search is faster and more efficient.</p>

<p><strong>EDIT:</strong></p>

<p>The relevant code is <a href="https://github.com/official-stockfish/Stockfish/blob/master/src/search.cpp" rel="noreferrer">https://github.com/official-stockfish/Stockfish/blob/master/src/search.cpp</a>:</p>

<pre><code>// Step 4a. Tablebase probe
if (!rootNode &amp;&amp; TB::Cardinality)
{
    int piecesCount = pos.count&lt;ALL_PIECES&gt;();

    if (    piecesCount &lt;= TB::Cardinality
        &amp;&amp; (piecesCount &lt;  TB::Cardinality || depth &gt;= TB::ProbeDepth)
        &amp;&amp;  pos.rule50_count() == 0
        &amp;&amp; !pos.can_castle(ANY_CASTLING))
    {
</code></pre>

<p><code>TB::Cardinality</code> is by default 6. Stockfish checks how many pieces, if it's no more than 6 it consults the tablebase information. Otherwise, regular search. </p>
