DoS attack: When someone or something prevents the user from accessing desired services. While the shop would open only after repairs, there are many ways of preventing/mitigating the attack in cyber security! Load balancing is a prevention technique.
Penetration testing: is a method of offensive security. Someone knowingly tries to break into a security system and tries to find vulnerabilities in the process. Of course, with owner consent.