How a boolean function is made for a circuit?
The output of any digital circuit depends on the input(s). The relation between them can be expressed in many ways:

Boolean function
The relation between the inputs(\$x_1,x_2,x_3\ldots\$) and output (\$y\$) can be expressed mathematically as a (boolean) function:
$$y = f(x_1,x_2,x_3\ldots)$$

for example, $$y=x_1+x_2\cdot x_3$$

There are two canonical way of writing any boolean function:
1. The Sum of Product (SOP) form
2. The Product of Sum (POS) form  

Truth table:
This relation can also be expressed as a table giving input combinations in one column and corresponding output in the other and this representation is called a truth table representation. 

Minterms and Maxterms:
Since these boolean functions are going to give either \$1\$ or \$0\$ as the output they can also be represented as a list of input combinations for which the output becomes \$1\$, called the minterms or as a list of input combinations for which the output becomes \$0\$, called the maxterms. 

Each minterm corresponds to an input combination for which the output is \$1\$, the output can be written as the sum (logical OR) of minterms. 
$$y = \sum(\mathrm{minterms})$$ 

Each maxterm corresponds to an input combination for which the output is \$0\$, and the output can be written as the product (logical AND) of maxterms
$$y = \Pi(\mathrm{maxterms})$$


  Why we take only 0 2 4 5 6 terms?


These are the minterms. The output should be high when any one of these input combination is \$1\$. So then the function can be written as the OR of these input combinations:

$$F = x'y'z' + x'yz' + xy'z' + xy'z + xyz'$$

Which can to reduce further to obtain a nice expression.

You can also write this function as a product of the maxterms: 1, 3, 7:

$$F = (x'+y'+z)\cdot(x'+y+z)\cdot(x+y+z)$$

reducing this will also give the same expression that was obtained earlier.