To find the product (for simplicity of two objects) in category of topological spaces $TOP$ one should use the universal property:
For any $Y \in Ob(TOP)$ and $\phi_{1,2}: Y \to X_{1,2} $ there is unique morphism (continuous map) $f: Y \to X_1 \times X_2 $ such that $\phi_{1,2} = \pi_{1,2} \circ f $. Now one deduces that (for instance) for any open $U \in X_1$ preimage $\pi_1^{-1}(U)$ should be open in $X_1 \times X_2$.
Now the thing which I don't understand is following: we are saing that preimages of open sets from $X_{1,2}$ are subbase of topology on the product. Why exactly subbase? How do we know that it isn't the base or something?