The answer is it really depends on how your actual seven segment display is built.
The display may have a tiny controller chip between your arduino and the actual digits, in order to simplify the interaction with the digits. If this is the case, you're using SPI or I2C to "talk" to that chip sending it commands, and the controller chip does the harder work for you turning individual segments in all those digits.
If the seven segment digits have no in-between chip (this is most likely what you have) then there's two main kinds of such displays:
1. Common anode digits - these are digits that have one pin to give voltage to all segments and when you connect any other pin to ground (sink) that individual segment light up because electricity flows from the common anode pin to that other pin, through the led.
2. Common cathode digits - these have one pin for each segment through which you give voltage and all the cathodes of the leds inside the digit are connected to a single pin, which you usually connect to ground. You turn on individual segments by sending voltage through one of those pin (usually 8 of them, the seven segments of the digit plus the dot)
When there's multiple digits, there's usually one common anode or one common cathode for each digit, and the 8 segments of all digits are connected together.
For example, if you have a common anode display and you send power to all 4 common anodes, then when you connect one of the 8 other pins to ground, that segment of each digit will light up, because all four anodes receive voltage.
If you want to display numbers like 1234, you can't send voltage to all 4 anodes all the time, because the top right segment of "1" will also show up on 2, which you don't want.
So, you turn only one digit at a time: prepare the 8 segment pins for digit 1, turn on digit 1, wait a few ms, turn off digit, set the 8 segments for digit 2, turn on power to digit 2, wait a few ms ... repeat, and loop back to digit 1 for ever.
If you're asking how to display a number like "15" on a 4 digit display , how to extract the number 1 and the number 5, you have mathematical functions that give you the remainder of a division ... so you can say something like
digit[3] = remainder of value divided by 10
value = value / 10
digit[2] = remainder of new value divided by 10
value = value / 10
...
digit[0] = remainder of value divided by 10
now you may have digit[0]=0 , digit[1]=0, digit[2]=1 , digit[3] = 5
If you don't want to display 0015 then you can simply do something like
start_from=0;
while (digit[start_from]==0 && start_from<3) start_from=start_from+1;
and now start_from will be the first digit that has non zero value, or the 4th digit.
digit