There are a number of sites which provide either labs or virtual machines which are intentionally vulnerable. Some provide other resources to help learn.
- https://tryhackme.com/
- https://overthewire.org/wargames/
- https://crackmes.one/
- https://portal.offsec.com/labs/play
- https://www.hackthebox.eu/
- http://flaws.cloud/
I'd also suggest getting a good foundation in programming and building systems.