Kernel of a homomorphism is a subobject? Background
I'm currently reading an abstract algebra textbook, written in a category-theoretical way. The contents are similar to any other algebra textbook. It covers groups, rings, $R$-modules, $R$-algebras, fields, etc. One special thing (in my opinion) about this textbook is that the author states definitions, theorems and exercises using "$\square\square$", which is an interface for algebraic structures mentioned above. For example,

Definition. Let $X$, $X'$ be a $\square\square$. For each binary operation $\ast$ equipped in $X$, if there exists a bijection $\varphi: X\rightarrow X'$ that satisfies $$\varphi(x\ast y) = \varphi(x)\ast\varphi(y)$$ then we say that "$X$ and $X'$ are isomorphic as $\square\square$". Moreover, $\varphi$ is called an $\square\square$-isomorphism. 

I have no problem understanding this - I can plug in groups, rings in $\square\square$ - and I really like the way the author introduces isomorphism in this way, since it gives the general idea of an isomorphism and isomorphic structures.
I was doing fine, until I started a chapter on subobjects...
The author chose not to define the (category theoretical) term object, and introduced subobjects as the following.

Definition. Let $X$ be a $\square\square$, and let $Y\subseteq X$. Using the binary operations of $X$, if $Y$ itself forms a $\square\square$, then $Y$ is a sub-$\square\square$ of $X$, and we write $Y\leq X$.

I also had no problem understanding the definition, (I don't know if this is actually correct, I have no reason not to believe the definition in the book) since I have already studied subgroups and (vector) subspaces. But as I read on, I felt that there must be something I don't know yet.

The Problem

Let $\varphi:X\rightarrow Y$ be a $\square\square$-homomorphism. Show that $\ker \varphi \leq X$.

The statement itself looks really simple. But I got stuck when I tried to prove this. If $\square\square$ were some concrete algebraic structure such as groups or rings, I could prove this, using the subgroup/subring criterion.
One thing I realized was that such criterion is different for different algebraic structures. 

My Question (TL;DR)


*

*What is a subobject?

*Is the statement in the problem true for general algebraic structure $\square\square$?

*If the statement is true, how would I prove this general statement? (Other than proving for each algebraic structure)


The question became too long, but thanks for reading and any references, hints are always welcome. Thanks in advance.
Note. I keep referring to category theory, but I have not studied category theory. It's just that I got curious and did some googling online for objects and subobjects (since the author won't be defining it) and found many results being related to category theory.
 A: Before we start, I just want to note one thing. While most algebraic structures have at least one binary operation, they can also have nullary operations that need to be preserved by homomorphisms. Nullary operations take no inputs and given an output. In other words, they're just constants. For example, groups have their identities and unital rings have both $0$ and $1$ that need to be preserved.
You might even make things more general by having any finite arity, or even infinite arity operations.

What is a subobject?

In this specific context, I would say it's a subset that is closed under all the operations of the algebraic object, be that binary operations (like the $*$ mentioned) or nullary operations.
Perhaps more generally than you need, a subobject in a category can be defined to be an equivalence class of monomorphisms into that object, where two such monomorphisms are equivalent if they factor through each other. If none of that made sense, don't worry. You'll learn all the necessary details in time.

Is the statement in the problem true for general algebraic structure $\square\square$?
If the statement is true, how would I prove this general statement? (Other than proving for each algebraic structure)

To even define $\ker \varphi$, we need some notion of a zero in $Y$. This is why I mentioned nullary operations above: $0$ is a nullary operation. Granted this, $\ker \varphi$ can be defined as the subset of elements of $X$ that $\varphi$ maps to $0$.
To check if this is a subobject, we need to check that it's closed under any binary operations and any nullary operations. If $x$ and $x'$ are in the kernel, then $x *_X y$ is in the kernel precisely if $\varphi(x *_X y) = 0 \leftrightarrow \varphi(x) *_Y \varphi(y) = 0 \leftrightarrow 0 *_Y 0 = 0$. For any nullary operation $e$ (i.e., a constant), $e_X$ is in the kernel iff $\varphi(e_X) = 0 \leftrightarrow e_Y = 0$.
So for this to be true in general, this zero element has to be closed under all the binary and nullary operations of the algebraic structure (in particular, the only nullary operation can be $0$ itself).
This should make some amount of sense. For groups, all this works perfectly. For rings there's a bit of a wrinkle with unital vs. non-unital rings. For unital-rings, kernels aren't really subobjects. The objects you get are (in general) non-unital, so they aren't algebraic objects of the same type. This happens precisely because $1 \neq 0$ in general, so $1$ is rarely in the kernel (remember that unital ring homomorphisms have to take $1$ to $1$).
For non-unital rings, things work out better. Non-unital ring homomorphisms don't need to worry about $1$ at all, so the only thing to check is that $0$ is closed under $*$ and $+$. Since $0 * 0 = 0 + 0 = 0$, kernels are subobjects.

Just an addendum. An example of an algebraic structure that most people don't really thing of as algebraic is pointed sets. For pointed sets, there aren't any binary operations: just a single nullary operations giving a specified point in the set. Homomorphisms of pointed sets have to preserve this specified point and the criterion above shows that we can use the specified point to define kernels and show that they're subobjects.
