Filo has covered operating systems, so I won't repeat that here (except to reference this answer about New Horizons' OS, which is Nucleus RTOS rather than VxWorks, by way of a change).
As for programming languages, there's inevitably a lot of C and C++, though there's a chance that a somewhat restricted subset of the languages is used to improve safety, ease of reasoning about programs, realtime response limits and memory usage and all the rest so they won't quite be the usual C and C++.
For some examples of stuff that isn't C, how about:
- HAL/S, originally designed for the Space Shuttle (aparently 85% of shuttle software was written in it). It has been used for other things, such as Galileo, which was put together back when the shuttle was still a thing.
- Assembly language is common, especially for older projects where there would have been much poorer support for high level languages. The Apollo 11 AGC source code is open source if you wanted to see what it looked like.
- FORTRAN seems to be everywhere. Voyager used FORTRAN 5 (presumably not released in 1905, but sometimes I do wonder... certainly it predated lower case letters) and later Fortran 77, also some C and some assembly language.
- Ada has appeared in many projects, including Huygens, Mars Express and Rosetta.
- Forth is also used (in NEAR, Galileo, Cassini, Rosetta and others), though more for smaller subcomponents and sensors rather than bigger and fancier control systems, I think. It is a quite different language to all the others listed here.
- There's stuff that transpiles to C, such as Simulink. This was apparently used for the guidance and control stuff in New Horizons, though the vast majority of the rest of the software on the probe was written directly in C.
I don't doubt there are many others, but this seems to take care of the vast majority of things.