its different for every manufacturer.
90s machines basically had a cpu running code from eeproms which just read switch matrix states / drives lamp matrix outputs etc... usually all the boards in the backbox.
newer machines swapped to faster microcontrollers running the show with node boards under the play field driving all the hardware linked by some sort of serial bus.
latest machines are basically embedded pcs/socs running linux (far easier to drive screens etc...) but every company does it slightly differently.
If you want to play best bet is something like Proc or Fast controller.