To use your example, trying to solve:
$$x\equiv 10\pmod{24}\\x\equiv 18\pmod{64}$$
You take each in terms of its prime factors:
$$x\equiv 10\pmod {3}\\
x\equiv 10\pmod{8}\\x\equiv 18\pmod {64}
$$
Note that $x\equiv{18}\pmod {64}$ implies $x\equiv 10\pmod 8$, so we are left with:
$$x\equiv 10\pmod {3}\\x\equiv 18\pmod {64}$$
which is a pair of equations with coprime moduli.
You can always do this. Prime factorization is hard, however, so if you wanted an algorithm, you'd want to come up with a more general way than just prime-factorization. There are ways, but I'd have to call them up from memory. But the general gist is that you need to always reduce the problem to the co-prime case, and some way to check for contradictions that rule out solutions.
As a rule, given $x\equiv a_i\pmod{m_i}$ for $i=1,\dots, n$ we can always find $d_1,\dots, d_k$ which are pairwise relatively prime, an each $d_j$ is a factor of some $m_i$ and $d_1d_2\cdots d_k=\operatorname{lcm}(m_1,\dots,m_n).$ And then we can rewrite the comgruences modulo the $d_j,$ check if the $\gcd(m_i,d_j)$ are compatible for a;l $i,$ and them solve.
Writing this out rigorously is a perfect example of something easier to see than describe or prove, but it seems like the easiest way is to do it by induction on $n.$