There's algoriths such as (Fast) Fourier Transformation which can help you with that. You give it some waveform signal on the input (a few milliseconds for example) and it gives you a list of frequencies/amplitude in return. You can then read and change the amplitude of those frequencies, then do the reverse transformation to get some waveform signal back and you have your equalizer 🙂
Note: The more data you feed your FFT, the more precise your equalizer gets (you get more detailed frequency ranges) but the more latency you have of course. FFT simply reads a list of levels for each period of time, and it outputs a list of amplitudes of each frequency. You then don't work with time (as a waveform does) but with frequency (as a RTA does).