In-competition testing refers to anti-doping tests conducted during or shortly before a competitive event to ensure athletes are not using performance-enhancing drugs, while out-of-competition testing occurs at any other time to prevent athletes from using banned substances to gain an advantage during training. Both types of testing are crucial for maintaining fairness and integrity in sports by ensuring athletes adhere to anti-doping regulations at all times.