Complex sentence: The next set of pulses goes to a second electromagnet; its pawl engages the (hidden) vertical teeth in the lower ratchet to rotate the shaft to the required position.
Split into simpler sentences: The next set of pulses goes to a second electromagnet. Its pawl engages the (hidden) vertical teeth in the lower ratchet to rotate the shaft to the required position.