how should I know when an equation has infinitely many solutions?

When trying to solve an equation and you end up with the exact same number on both sides , like 10=10 then the equation has infinitely many solutions. If you end up with 2 different number on both side of the equation, like 3=5 then the equation has no solution. If there is a variable on one side and a number on the other, then there is one solution, e.g. x=4.