Full definition
SOCKS5 is a generic-purpose proxy protocol that operates at a lower level than HTTP proxies. An HTTP proxy understands HTTP requests and can rewrite them; a SOCKS5 proxy just forwards bytes. This makes SOCKS5 useful for any TCP-based protocol — IMAP/SMTP for email scraping, BitTorrent traffic, IRC, raw TCP — and for HTTP traffic that uses HTTP/3 (which is UDP-based and needs SOCKS5 with UDP support).
Most proxy providers offer both HTTP and SOCKS5 endpoints. SOCKS5 is technically more efficient (no protocol-level rewriting overhead) but the difference is negligible for typical web scraping. The decision is usually about feature support: if you're scraping plain HTTP/HTTPS, HTTP proxies work fine. If you're tunneling anything else, SOCKS5.
SOCKS5 with authentication uses a username/password or IP-whitelist scheme. Watch for "SOCKS4" if it's offered — that's an older variant without authentication or DNS resolution support, and you almost never want it.