Spinning Wheels are used to refine Flax into Linen Thread which is needed for almost all end-game equipment in Valheim. You need to defeat Moder and craft an Artisan Table to unlock the spinning wheel.
Spinning Wheels are only used for refining flax. It has an input chute that can be loaded with 50 flax at a time and then it will automatically refine any flax put inside. Spinning wheels output linen thread as soon as the thread has been produced. This process is slow (30s) and will take a long time to refine a full stack of flax.