most likely it's a hardware buffer issue
you need to look in your software for information on 'buffers'
When recording the computer stores information in these buffers for any processing that needs to be done on them before passing them on. If the buffer size is set too small the computer may not have enough time to process it so it leaves out information or glitches when writing to disk. If the buffer is set to high you experience a large amount of latency in the monitoring chain.
When recording you want to turn down the buffer size as low as you can get it without hearing those pops. This way you avoid as much latency as you can and also keep the signal steady enough so no pops/glitches are introduced.
And when mixing you want to turn it as high as you can get it. The higher you make the buffer, the slower the response time between you hitting play on the keyboard and the software actually starting to playback. This can get annoying, so just find a comfortable spot. But, the higher the buffer the more processing can be done without glitches during mixing.
HTH