The first thing people notice about you, is your face. The second is your shoes (remember the term "well-heeled"), and what's right next to your shoes? Look down.
Socks (called hosiery in finer men's stores) protect your feet from rubbing against your shoes, keep your feet warm, and provide another style element in your wardrobe.

Foot Notes:
The word "sock" is derived from the Latin soccus, the Old English socc and the Middle English word socke. The "soccus" was a shoe worn by Roman comic actors. The Middle English socke meant a low shoe or slipper and later a knitted foot covering sometimes extending to the knee.
"Hose" came from the Old English and Old High German word hosa, meaning leg covering.
By 1583 the word "stocking" was used to describe a covering for the feet and legs. Stocking came from Middle English stok or stokke, meaning leg covering, from Old English stocc, tree trunk.
A tree trunk isn't too far from the shape of a human leg. The word evolved into "stock", used to mean the covering for a leg. Upper stocks were breeches and netherstocks were the lower coverings or stockings.
A pair of socks is referred to in the plural just like trousers.

Coordination (for dress and casual):
Socks should match the color of your trousers not your shoes. Socks should be an extension of the trousers in color tone.
They can be slightly darker than your trouser color. This gives an uninterrupted visual line from your waist to your shoes. Otherwise an observer's eye stops at your ankle; not an area we necessarily want to emphasize.
You can use a secondary color in the sock (patterns, etc.) to match a tie, pocket square or shirt color. A burgundy tie for example with a touch of burgundy in your sock can be a great look.
But no matter what kind of sock you're wearing, you have to be careful how you show them off. When you are walking or standing, the only way anyone should see your socks is if your trousers are too short.
Obviously, guys in gyms don't have to sweat this detail, and if you're wearing shorts it doesn't apply, but otherwise your trousers should always be long enough to break on your shoes and cover your socks. One of the worst wardrobe gaffes you can make is to show skin at the ankle thus pulling the sock up to fashion prominence.

Here are the three categories of men's socks:

Rule of thumb: The dressier the situation, the darker the socks.
In addition to being a dark color, dress socks are usually made from a fine fabric such as silk, although wool and cotton socks in a thin fabric are also appropriate. Some socks
may also contain a percentage of Nylon for fit, durability and smooth appearance.
It was the Victorians who insisted that men should wear dark socks. After Rev. William Lee of Nottinghamshire invented a machine to knit socks in 1589, all kinds of colors were worn.
But the nineteenth century saw a return to more somber hues. Sock decoration became popular again after WWI, when shoes replaced ankle boots.
Socks could again be seen, and an embroidered ankle decoration known as "clocks" became hot fashion stuff!
The length of dress socks is more commonly over-the-calf (the longest available).
  • Weaves
    • Plain -- with no texture, it's the most conservative
    • Ribbed - woven with raised vertical ribs
    • Cable -- a raised rib that intertwines.

These are the socks you can wear in a wide range of situations -- whether you're wearing chinos, slacks or jeans.
The rule still applies for matching socks with trousers, but with casual socks you can get into more color, pattern and texture.
Heavier weight socks are perfectly okay in casual circumstances. For length, you can go for a mid-calf -- also known as crew socks. Just make sure your trousers fit properly so you don't flash any leg skin when you sit down.
Socks can be any pattern imaginable - plaids, checks, dots, and stripes. The more pattern the more casual.
A note about Argyle. It's a sporty multicolored diamond pattern reportedly first sold in the USA by Brooks Brothers in 1949 when the company president, John Clark Wood, noticed a Scottish golfer wearing them. The distinctive diamond pattern is derived form the original hosiery worn with Scottish tartans (plaids).
Some Scotch for your ankles!
They were cut from the same cloth as the kilt, but on the bias so that the squares on the kilt became diamonds on the stocking. The socks are not related to the clan Argyll (note the different spelling).
Be wary of wearing dress socks with more casual outfits.
Take it from Dashiell Hammett.
Here's a clothing note from The Glass Key:
"He was looking at the blond man's outstretched ankles. He said, 'You oughtn't to wear silk stocks with tweeds.'

Madvig raised a leg straight out to look at the ankle. 'No? I like the feel of silk.' Then lay off tweeds.'"

Athletic socks are about the weight of casual socks, but they usually have a cushioned-sole or some other feature specific to the sport for which they were designed.
Usually, they're white or white with colored stripes at top or with a logo. Athletic socks are mostly cotton, a natural fiber that lets your foot breathe and wicks away moisture.
High tech fabrics may be incorporated into socks to provide superior wicking properties, warmth, and blister avoidance.
Andy's Powder tip: If you use talc in your shoe, make sure it's in the shoe and not in your sock. Putting powder in your socks traps the moisture there.
Most Athletic socks are crew or mid-calf length, however for certain sports like running, an anklet (the shortest) is available. In other situations -- playing soccer, for instance -- over-the-calf is de rigueur.

Sock Care
Machine wash in cold or warm water is fine. Remember socks take a beating, so don't expect them to last forever. Wash athletic socks in hot water to make sure you get the stains and smell out!

Andy's Tip
When you buy a pair of socks get two or three pair of the same style and color. When the sock monster, who hides in the dryer and eats socks, consumes one of yours, you'll still have others to match.

There is such a thing as sock size! Many men's hose say "one size fits all" on the package thanks to the addition of some stretchy fabric like Nylon.
But your real sock size could be larger than your shoe size. For example, if you wear a 9 shoe, you may be a size 10-10½ in some socks. Be sure to consult the sock manufacturer's sizing chart & sizing recommendation guide to determine what size to order from the brand.
To ascertain sock quality and comfort, look for a flat seam across the toe.
Go ahead, sock it to 'em!