A retail pharmacy technician works in community pharmacies, focusing on customer service and filling prescriptions. In contrast, a hospital pharmacy technician works in hospital pharmacies, preparing medications, collaborating with healthcare professionals, and managing drug inventory and records.