What is the relationship between a program and processes in the Operating System?
Depends on the program.
I can write low level program that doesn't need an operating system. Indeed that's what an operating system is. If the hardware supports everything I need I won't even miss the os.
If however, I need to load a file and have no OS to help out I'm in for a bit of work. The OS normally abstracts things away that I'd normally rather not think about. What kind of controller does the drive have? What commands are used to address data? This isn't easy without an OS that dictates a common interface for drivers to implement so you can talk to every hard drive controller the same way.
As for math, well now were talking to the ALU, maybe. Maybe the CPU does this natively on this hardware. More stuff you have to know because the OS isn't taking care of it for you.
If the program expects an operating system to be available to it the relationship is that the OS abstracts away hardware details and determines when the program gets to run (multithreaded OS or not). The OS can also halt a
If the program doesn't expect an operating system it maybe an operation system itself. Or it may just be a dedicated program for that hardware.
If we're talking about Java, well there's this Virtual Machine that tries to make every hardware and OS look the same to the program so it can work on any hardware and any OS. This abstracts away details so the program doesn't have to care what it's running on.
The essential relationship is programs need things outside themselves to work properly. The operation system may be one of those things.