To get to quaternions you just need to ask “alright, but what if there were another square root of -1?”. So, you call that new number “j” (not to be confused with “j” from engineering, which is actually just “i” and presumably stands for “jamaginary number”). In the same way that we can write complex numbers as A+Bi, we should be able to write these new numbers as A+Bi+Cj; “trinions” as it were. Complex numbers are just a pair of real numbers with some algebra glued on. With this weird looking formalism in hand you can go from real numbers to complex numbers to quaternions to octonions to sedenions and so on and on and on (if you really want to).