Loosely defined, sock yarn is, of course, any yarn that you use to knit socks. It can be lace-weight or worsted and made of just about any fiber under the sun.
Most sock yarn, however, is yarn developed specifically for that purpose. It is usually light weight (though it can be heavier) and knit on very small needles.
Sock yarn is often a blend of fibers that makes the finished fabric more durable. While regular wool yarn can be used for sock, many people prefer superwash wool for socks because it can be washed in a washing machine.
Other good choices for socks include wool blends and just about any kind of yarn with a bit of nylon added for durability.