Anonymity and confidentiality are both important aspects of research ethics.
Anonymity means that researchers do not collect personal information that can be used to identify a participant or that someone’s responses cannot be linked to their identity.
Confidentiality means that only the researchers conducting a study can link study responses or data to individual participants.
If you run a study and do not know who your participants are (i.e., you collect no identifying information), your data are anonymous. If you know who your participants are but no one else does (i.e., you collect identifying information but don’t publish it), your data are confidential.