Birth control, does it actually work?

J
I'm not planning anytime soon to have sex but does the depo shot actually work as a birth control method or is it ineffective?