We want to put topology on a set $X$ formed by union of many other topological spaces indexed by $X_{\alpha}$ $$X = \prod_{\alpha \in A} X_{\alpha}$$
We can take the product topology on $X$ is defined to be the topology generated by the basis $B=\{ \prod_{\alpha \in A} U_{\alpha} | U_{\alpha} \subset X_{\alpha} $ is open and all but finitely many $U_{\alpha} = X_{\alpha} \}$
I can't seem to understand the "open and all but finitely many" part. Could someone break down what the book is saying a bit more?
It just means that all $U_{\alpha}$ have to be open, but only finetely many of them can be anything other than $X_{\alpha}$.
For for example if you have an infinite product $\mathbb{R}^{\mathbb{N}}$ a product like
$(0,1)\times (-1,2) \times \mathbb{R} \times (1,2) \times \mathbb{R} \times \mathbb{R} \times \cdots$
will be open, because only the first, second and fourth sets in the product are not $\mathbb{R}$ and the rest is. On the other hand something like $(0,1) \times (0,1) \times \cdots$ isn't open because infinitely many of the intervals are not $\mathbb{R}$.
I hope it is clear. It is actually fairly simple once you realise what the "all but finitely many" means.