There are many ways to accomplish this. Some of the more obvious ways is to use an up do. You can pin up your hair in a French twist or a chignon. This can be done clean and sleek. And neat or you let a few tendrils fly or give it an unkempt type of appearance. You can also try a half do where the top portion of the hair is swept back in a formal bun of some sort and the back half of the hair remains down. This is a great hairstyle to use to incorporate hair accessories such as flowers, jewels, or crystals.
Braids are also a good way to make a formal look out of a medium hairstyle. You do not need excessive length for braids and you can use multiple braids as well as different thicknesses. This type of hair style really lends itself to creativity.
One of the newer formal styles of hair are known as sedu hair. This is a slick and smooth finish to the hair. You use a straightening product to smooth the hair out.
A flat iron can and usually is also used to help achieve this effect. You can flip the hair out or curl it under in this type of hairdo. It is nice for medium hair as it does not need a certain type of length to achieve it the only key is the smooth look.