There are two forms of current, Direct Current (DC) which has the current flowing in one direction only like from a battery, and Alternating Current (AC) which is like what comes out of the mains outlet. The current, or flow of charge, goes one way first, and then the other.
A capacitor blocks DC, but will pass AC above a certain frequency. Smaller cap = higher frequency. Because a guitar signal and all other audio is AC, the capacitor will pass the guitar signal, but not the DC current. You can sortof think of them as a wall to stop DC from going places you don't want it to.