How does a hud display work in a flight sim?

This is just a random question but how do the hud displays work? (such as texturing and programming)