Let $G$ be an algebraic scheme over a field $k$ (in the sense of these notes http://www.jmilne.org/math/CourseNotes/iAG200.pdf, I can try to explain more if anyone needs), and $m: G \times G \rightarrow G$ a morphism in this category. Here (I think) you can put a sheaf on the literal cartesian product $G \times G$ to make $G \times G$ into an algebraic scheme which is a categorical product with respect to the restriction maps (which will also be morphisms).
The pair $(G,m)$ is called a group object if there exist morphisms $e: \ast \rightarrow G$ and $\iota:G \rightarrow G$ which satisfy a bunch of diagram commutativity properties. Here $\ast$ is the one point scheme $\textrm{Max } k$. Since morphisms of schemes are also continuous functions on the underlying topological spaces, if I consider $m$ as a continuous function on the cartesian product $G \times G$, it seems like a group object is literally a group, whose identity is the image of the function $e$.
Is this the case? In the notes I'm reading, it seems like Milne is not saying this.
There's some confusion arising from the conventions in Milne's notes. As Alex G. remarks, the underlying set of the product of schemes is not equal to the cartesian product of the underlying sets in general. However, Milne works only with closed points (the underlying set of an affine scheme is the maximal spectrum instead of the prime spectrum) and only considers schemes of finite type over $k$.
If $k$ is algebraically closed, and $A$ and $B$ are schemes of finite type over $k$, then the set of closed points of the product of $A$ and $B$ is equal to the cartesian product of the sets of closed points of $A$ and $B$. This is also true for fibered products.
So using these conventions, when $k$ is algebraically closed, the "underlying set" (set of closed points) of an "algebraic group scheme" (group scheme of finite type over $k$) is an honest group.