Ultraproduct is defined as $$\prod_{i \in I} M_i $$
I know that structure is usually of form $(A, \sigma, I)$, but in this context, what exactly is structure, and how do we get the cartesian product?
Edit: so $M_i$ is structure here according to the definition of ultraproduct, but how can structures be combined to form cartesian product?
In the most general sense, suppose we have a family $\{ \mathfrak{A}_i \}_{i \in I}$ of structures over the same first-order language/signature, and an ultrafilter $\mathcal{U}$ on the index set $I$. The ultraproduct of this family with respect to the ultrafilter $\mathcal{U}$ is defined according to the follow steps:
Of course we have to show that the results of (3) and (4) above are actually well-defined, but this is not too difficult.