Intuition for definition of product topology (Topology: A categorical approach) 
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?
 A: 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.
A: We say $E\in \mathcal{B}$ if and only if it equals a product $E=\prod_{\alpha\in A}U_{\alpha}$ such that each $U_{\alpha}$ is open in $X_{\alpha}$, and such that the set of indices $\{\alpha\in A\,:\, U_{\alpha}\neq X_{\alpha}\}$ is a finite set.
More generally, suppose we have a statement $P(\alpha)$ for each $\alpha$. We say $P(\alpha)$ holds for all but finitely many $\alpha$ in $A$ if and only if the set $\{\alpha\in A\,: \, \neg P(\alpha)\}$ is a finite set (that's literally the translation into symbols of the phrase "for all but finitely many"). For example, if the index set $A$ is finite, this always happens, so this phrase is something you only have to worry about when $A$ is an infinite set.
