It seems that you have missed the given options for this question which are the following:
A. the crankshaft journals
B. the camshaft lobes
C. the rocker arms
D. the push rod
But anyway, the correct answer would be option B. The camshaft lobes.
The component that controls the opening and the closing of the valves in an engine is the camshaft lobes. Hope this answer helps.