counting 7 segment display

the inputs for the 7 segments i understand but im not sure about the output circuitry i need something to help me clarify it(sorry about my beginner arduino status) maybe siing the code or another example would help