A SOCKS proxy relays raw network connections for any app without understanding what is inside them; SOCKS5 can also carry UDP.
Explanation
SOCKS was created to let programs other than web browsers cross company firewalls: chat clients, games, custom TCP services. An HTTP proxy reads requests; a SOCKS proxy just opens the connection your app asks for and copies bytes in both directions. SOCKS5 added login, UDP relaying, IPv6 and the option to let the proxy look up host names, so DNS queries leave from the proxy instead of your device. It encrypts nothing by itself. Firefox has its own SOCKS setting, Chrome uses the system proxy settings, and Tor's client exposes a local SOCKS5 port that browsers and apps connect to. Because it does not understand HTTP, a SOCKS proxy cannot cache or filter pages, which is the price of carrying anything. In practice the choice is simple. To route a whole app such as a game, a torrent client or a chat program, you need SOCKS (or a VPN). To open web pages in a browser, an HTTP proxy or a web proxy fits better. AnyProxy is a web proxy, not a SOCKS server: it carries pages opened in its browser tab and nothing else.
In practice
SOCKS5 was published as RFC 1928 in 1996 and usually runs on port 1080. It forwards any TCP connection, and UDP through its UDP ASSOCIATE command, without understanding HTTP. A common do-it-yourself version is SSH's -D option, which turns an SSH login into an encrypted local SOCKS proxy: the hop to the SSH server is encrypted by SSH, not by SOCKS.
Sources: RFC 1928 - SOCKS Protocol Version 5
Questions about SOCKS proxy
Related terms