Cogroup objects are sort of dual to group objects. The defining property of a cogroup object is that morphisms out of it form a group. Specifically, if $C$ is a category, then $G$ is a cogroup object in $C$ if $\operatorname{Hom}(G,X)$ is a group for any object $X$ in $C$ (and the group structure must be natural in $X$).
There are many examples of cogroup objects. Perhaps the most well-known are the spheres in the homotopy category of based topological spaces, $\operatorname{hTop}_*$. Then the fact that $S^n$ is a cogroup object in $\operatorname{hTop}$ is precisely the statement that the homotopy group $\pi_n(X)$ is a group, naturally in $X$, for all topological spaces $X$. (Note that this fails for $n = 0$.)
The basic definition is as follows.
Let $C$ be a category. To give an object $G$ of $C$ a cogroup structure in $C$ is to give the functor $\operatorname{Hom}(G,-)$ a lift? from $\operatorname{Set}$ to $\operatorname{Grp}$.
A cogroup object in $C$ is an object $G$ together with a choice of cogroup structure.
A morphism of cogroup objects $G_1 \to G_2$ is a morphism in $C$ between the underlying objects of the $G_i$ such that the natural transformation $\operatorname{Hom}(G_2,-) \to \operatorname{Hom}(G_1,-)$ lifts to a natural transformation of functors into $\operatorname{Grp}$.
Thus cogroup objects and their morphisms can be thought of as the category of representable functors from $C$ to $\operatorname{Grp}$.
Providing $C$ has enough coproducts of $G$ (the $0,1,2,3$th copowers to be precise), the concept of a cogroup structure on $G$ can be internalised.
To give an object $G$ of $C$ a cogroup structure is equivalent to choosing morphisms $\mu \colon G \to G \amalg G$, $\eta \colon G \to 0_C$, and $\iota \colon G \to G$ satisfying the diagrams for associativity, unit, and inverse but the other way around.
Here, the phrase “the other way around” means: take the normal diagrams for a group object that express the properties of associativity, unit, and inverses, invert all the arrows, and replace products by coproducts.
A cogroup object in a category, say $C$, is nothing more than a group object in the opposite category: $C^{op}$. However, the morphisms go the other way around. That is to say, with the obvious notation:
Of course, there is nothing special about groups here. The same definition works for any variety of algebras in the sense of universal algebra.
As mentioned in the introduction, spheres are cogroup objects in the homotopy category of based topological spaces, $\operatorname{hTop}_*$. More generally, any suspension is a cogroup object with the “pinch” map as the comultiplication. (Since the $0$-sphere is not a suspension in $\operatorname{hTop}_*$, but only in $\operatorname{hTop}$, it need not be a cogroup and in fact is not.) This is dual to, and equivalent to, the statement that (based) loop spaces are group objects in $\operatorname{hTop}_*$ since there is an adjunction, internal to $\operatorname{hTop}_*$:
The higher spheres are actually abelian cogroup objects, as demonstrated by the fact that $\pi_n(X)$ is abelian for $n \ge 2$.
There are examples of spaces that are cogroups in $\operatorname{hTop}$ that are not suspensions. Note that cogroups in $hTop$ are the same as co-H-spaces which are additionally (co-)associative and have (co-)inverses.
Cogroup objects in the category of groups are free groups, and to give a free group the structure of a cogroup object is the same a choosing a generating set. This is an old result of D.M. Kan’s.
On the other hand, every abelian group is again an abelian cogroup since $\operatorname{Ab}$ is self-enriched. Indeed, in an abelian category every object is simultaneously an abelian group object and an abelian cogroup object. In $\operatorname{Ab}$, the abelian cogroup object structure is unique, with comultiplication given by the diagonal morphism.
In Set, the only cogroup object (abelian or otherwise) is the empty set. This is because the counit map must be a morphism from $X$ to the terminal object of the opposite category. In the case of $\operatorname{Set}$, this is the empty set.
This extends further: any category with a faithful functor to $\operatorname{Set}$ which preserves an initial object will have no non-trivial cogroup objects. In particular, the category Top of unbased topological spaces has only the empty space as a cogroup object.
The case of cogroups, and some other co-things, in certain other varieties of algebras has been extensively studied by Bergman and Hausknecht in Co-groups and co-rings in categories of associative rings, (MR1387111)