Because most interesting circuits are non-linear the nodal equations can't be solved directly by straightforward methods (eg. LU decomposition), so Newton-Raphson method is applied to converge to a solution within tolerance criteria. Nonlinear components are linearized about an operating point and a new operating point is calculated, repeating until convergence is achieved.
Once an operating point has been found, for transient analysis a numerical integration (using one of several possible methods) is used to calculate the effect of capacitors and inductors for the next time step and the process repeats. Time steps are dynamically chosen from tolerance criteria.
For AC analysis, the operating point is calculated and linear models are used.
You can refer to documents such as UC Berkeley memorandum ERL-M520 (424 pages) authored by one of the originators of SPICE. For example, he discusses Runge-Kutta and its drawbacks and modifications.
The book Inside SPICE by Ron Kielkowski has a lot of detailed information, concentrating on SPICE 2g.6. The information on the timestep control algorithm variations may be of interest.
From here is a flowchart of the program flow:

Of course you can download the source code for some versions of SPICE (Berkeley has some C code available) and examine it.