An easy and very effective way to learn about computer security is through games called Capture The Flags (CTFs). These games are simulations of real environments, with vulnerabilities and challenges. The following is a list of some of the most famous games.
Hack The Box (https://www.hackthebox.eu/) is a complete laboratory, and is totally free. It has different scenarios to practice in real environments, with detailed explanations about how to perform testing.
Damn Vulnerable Web Application (http://www.dvwa.co.uk/) is a project developed in PHP to learn about application security. It is easy to install and has different levels to teach each topic, including an OWASP testing guide.
Badstore (https://www.vulnhub.com/entry/badstore-123,41/) is an application that simulates an online store, developed with JavaScript and MySQL. It has the most common store features and it is possible to apply basic security application concepts...