To construct the smoke rack, you must have yarn, and an open space of at most 5 blocks between two walls (eg. between two trees). Right-click while holding the yarn on the second block above the ground, and as much yarn as required is consumed to produce a line between the two walls.
To use the smoke rack, meats must first be brined. They can then be hung on a smoke rack line as long as you have 1 yarn in your inventory. This will simply dry the meat, and takes about 4 in-game hours. Removing the meat consumes the yarn used to hang it.
To smoke meat or cheese, simply start a firepit below the hanging food. Smoking takes a lot longer; you must wait 12 hours and keep the fire burning, so make sure you supply the fire with plenty of logs. Two pieces of food can be hung on each block of line, allowing you to smoke two 160oz food per firepit. From version 79.14 decay is paused for the food while it is being smoked. The yarn will turn black when the smoking procedure is complete.
Smoking food modifies decay rate to 0.75, whereas drying food reduces the decay rate to 0.25. Smoked food however has additional taste. This is not always visible to the player, as the taste profile differs from player to player, and is specific to the world seed.