Confinement, duality, and nonperturbative aspects of QCD