They are literary macguffins like JBH said.
If you want a more fun in-canon answer, it's all implied and not explicitly stated how it works.
I do know that Seven of Nine is a cyborg so she probably has a repository of already written code (She might actually think in some fancy borg code.) that just needs to be downloaded. She's a workaholic and a nerd so it's implied she probably has already altered it to fit the Voyager's operating system. As far as the actual language I'm sure they use a lot of different languages since different languages are good for different things. There is an example in Star Trek: Discovery 1x03 "Context is for Kings" where they use something lower-level like C++ that they actually have to allocate memory. (This answer) In TNG there were those Bynar people so we do also know that all the hardware is still using binary too.
As far as something like the holodeck it probably works like ChatGPT does. In every episode it's used, it's given a novel of words to translate into a computer language. It compiles and runs the program. It also creates 3D models using composites like current AI does now for creating images of people who don't exist.
If you've ever used ChatGPT you'll also find that it sometimes spits out great code or you have to tell it to try again with new parameters. This could be causing the instability in the EMH. It's probably safe to say the AI generated code probably isn't great to use unless you're a programmer and know what it's actually doing even in Star Trek. The computer screens that are used by officers in Voyager to fix the EMH often look a lot like a UML design or a node system that something like Unreal Engine might use.
Pre-constructed customizable code carefully constructed to control a hologram. I can't think of an example but, often times officers having to service the EMH complain about all the sub-routines added in making the EMH unstable so I have a feeling that the AI code that's generated is similar to how ours is created.