A code of ethics is a set of principles and standards that guide the professional and personal conduct of individuals or organizations. It outlines the ethical behavior expected within a particular field or industry, helping to ensure accountability, integrity, and responsible decision-making.