Immunization and epidemic dynamics in complex networks