Web browser designers are constantly updating the security features of their software. To that end, many browsers display a can't-miss warning if you try to load a questionable site.
If a site is deemed insecure, either due to its illegal material or because it hosts potentially damaging malware, your browser halts the loading process and shows a warning. In most cases, you'll have the option of reversing course, or, at your own peril, plunging ahead into dangerous digital waters.
You can be sure that legal, above-board sites rarely trigger such messages. Don't rely on a browser's warning system alone to protect you, though. Prevent egregious user errors (that is, blindly clicking away at weird links) by avoiding questionable sites whenever possible.