Add Custom Value to Woocommerce Order

Woocommerce documentation, while thorough, can be hard to follow sometimes. Here are some functions I found somewhere on the Woocommerce site (which I can never find) that allows adding some custom values to the checkout order form and then attaching that value to the order.