There are many types of valves used in excavators. Two are important: the main valve and the pilot valve. Is the pilot valve is controlled by the operator and the main valve is controlled by the pilot valve? But I can't imagine this system properly. How can the pilot valve control the main valve? Additionally, I am not able to understand the flow of oil after pumping. Will it go to the main valve or the pilot valve?
Think of the pilot valve as a "lever" to control the main valve.
If you obtain a system diagram then you can follow what happens.
There are many texts available that describe the functions of all the parts in a hydraulic system. I have the set of Hydraulic books by Mannesman Rexroth Sigma, now part of Bosch, so I don't know if they still produce them. Worth searching for and reading.
This is a link to one of the series (they were produced in several languages, in fact they also produced a technical dictionary across 6 languages which I still find useful): enter link description here