Footwear typically prevents unnecessary wear and tear on one's flesh from walking or standing. It can also be used to enhance performance of certain difficult tasks that one's feet cannot do by their genetic ability.
Starfleet uniforms include regulation black boots. Women's boots usually have a little higher heels than the men's. Starfleetuniforms starting in the 2350s included a loop at the bottom of the pant leg, which wrapped around the bottom of the boot to hold it in place.
In 2269, Spock requested (among other things) a special pair of boots for his trip backwards in time to rescue his younger self. (TAS: "Yesteryear")
One unique design was the footwear of the early-2270s, which was entirely different from any other Starfleet-issued boots. The footwear was the same color as the wearer's uniform, and the female variety had high wedge-type heels. (Star Trek: The Motion Picture)