If you are interested in how Compression works, there is plenty from @Majik in this thread Compressor for volume when “Cleaning up”
The thread starts with how I use a compressor - my clean tone is now neck humbucker into a compressor (then chorus, delay with reverb on the amp). But you don’t have to scroll far for the compressor explanation.