How would i make a dynamic skybox?

Yes, Im aware it does. But i was wondering how i could make it from scratch.