### Theory:

Like and unlike:

When you visit a library, you can see that the books are arranged separately according to the genre of the book.

The mathematics books and history books of the same kind are kept as separate racks in a different place.

This means that all mathematics books are like, and history books are unlike each other.

Similarly, we can group the same kind of terms in an algebraic expression.
Example:
Now take a look at this,

$\underset{¯}{10x}\phantom{\rule{0.147em}{0ex}}+2y\phantom{\rule{0.147em}{0ex}}\underset{¯}{-5x}+6z+\underset{¯}{20x}$ here this expression has $$5$$ terms and out of $$3$$ terms have the same variable factor that is $$x$$.

So now we can say that the $10x,-5x,\phantom{\rule{0.147em}{0ex}}20x$ are like terms.

And the terms $10x,2y,6z,\phantom{\rule{0.147em}{0ex}}$ have a different variable factor.

That is the terms $$10x$$ have $$x$$ as a variable factor, the term $$2y$$ have $$y$$ as a variable factor, and the term $$6z$$ have $$z$$ as a variable factor.

So this kind of terms is called as, unlike terms.
Now let's see some examples with a definition for proper understanding.
Like terms:

The terms which have the same variable factor that is called like terms.
Example:
Like terms are:
 and and and $$-3$$ and $$10$$ and
$\begin{array}{l}3\mathit{ac}\phantom{\rule{0.147em}{0ex}}\phantom{\rule{0.882em}{0ex}}\phantom{\rule{0.147em}{0ex}}\mathit{and}\phantom{\rule{0.147em}{0ex}}\phantom{\rule{0.147em}{0ex}}-3\mathit{ac};\phantom{\rule{0.147em}{0ex}}\\ 9\mathit{ba}\phantom{\rule{0.147em}{0ex}}\phantom{\rule{0.147em}{0ex}}\phantom{\rule{0.735em}{0ex}}\mathit{and}\phantom{\rule{0.147em}{0ex}}\phantom{\rule{0.147em}{0ex}}-9\mathit{ba}\\ 4{x}^{2}y\phantom{\rule{0.588em}{0ex}}\mathit{and}\phantom{\rule{0.441em}{0ex}}10{x}^{2}y\end{array}$

Here we have to care about only the variable is same or not irrespective of the arithmetic operation$$(+, -)$$
Unlike terms:

The terms which have the different variable factor that is called as, unlike terms.
Example:
Unlike terms are:

$\begin{array}{l}10x\phantom{\rule{1.323em}{0ex}}\mathit{and}\phantom{\rule{0.294em}{0ex}}10y\\ 2\mathit{bc}\phantom{\rule{1.323em}{0ex}}\mathit{and}\phantom{\rule{0.294em}{0ex}}2\mathit{ca}\\ 4{x}^{2}y\phantom{\rule{0.882em}{0ex}}\mathit{and}\phantom{\rule{0.294em}{0ex}}5{y}^{2}x\end{array}$