That's a simile, where you compare two things.
"The fog in London was like a pair of thick socks."
"She snuggled up in bed, warm like a pair of thick socks."
There's a poem by Jimmy Santiago Baca that starts:
"I am offering this poem to you,
since I have nothing else to give.
Keep it like a warm coat,
when winter comes to cover you,
or like a pair of thick socks
the cold cannot bite through,
I love you."