There are many variations on the process of seasoning a wok, but they all essentially boil down to cleaning the wok thoroughly and heating it with some sort of oil or fat.
Video by Poh's Kitchen.
Carbon steel woks are one of the most versatile pieces of cookware; you can stir-fry, boil, braise, and use them to make soups and stews, but only after the wok has been properly seasoned.
New woks are usually covered in machine oil or grease to prevent rust that needs to be removed; steel wool works best, but dish soap and a sponge can work in a pinch. This is the only time you will ever use soap with your wok unless it becomes rusty. Place the now-clean wok on your range and turn the heat on the highest setting. Pour some corn, vegetable, or peanut oil in the bottom of the wok. You can spread this oil around by moving the wok or by using wet paper towels held by tongs; be careful not to burn yourself! This will produce a lot of smoke, so make sure your windows are open and let your fans run. Continue this process until all of your wok interior has a brown or black patina, which will protect against rust. Many like to add chopped ginger and/or spring onions to the wok during this process as they say it will leach out any metallic flavours from the wok.
When cleaning your wok rinse it with hot water; if something sticks and won't rinse away, sprinkle it with salt and rub with a paper towel until the object dislodges itself. After rinsing the wok place it back on a hot burner to steam away any water. Dip a paper towel in oil and wipe down the inside for the first several times using your wok before putting it away.
When Cheaper is Better: How to Properly Season a Wok [The Paupered Chef]