It's part of the steam badge and I don't have one in my inventory to use. I know you can buy one, but how do I get one otherwise?
You can trade for them, buy them from the Steam Marketplace, or they drop when you craft a new badge. The emoticon will be from the set that is related to the game/event that the badge is for.
To craft a new badge, you need a set of trading cards for a particular game or event. These can be bought at the Steam Marketplace (same as the emoticons), earned from playing eligible games in your library, or earned during special Steam events.
Most emoticons are cheap - cheaper than buying cards for a given game. Thus, if you are interested in a particular emoticon for which you don't own the game or have a card set, you might start with the Marketplace first.
I got each of mine by crafting badges.
From the Steam wiki: