Basicly in every language There's no possibility to run anything at the same time. Well I guess new processors like quad cores can handle things at the same time, but that's another topic. When you have one processor(1 calculator) you can calculate one thing at a time. That means Everything you code is run in a queue, or a list "to-do" things.
You can have multiple functions that control different things, or a function that control many things. But they're all done in a sequence, one at a time. Then, the frame syncing makes the computer seem that it does many things at the same time.
Like:
sync on
for n = 0 to 100
print str$(n)
next n
sync
suspend for key `or what was the command ;D
This does input all the n's on the screen at one frame. It seems to you that it's done at the same time as it appears to the screen instantly. But you know, the data has been run through the processor on a queue, driven into a memory/GPU memory or something and then displayed on the screen. It must be calculated/prosessed first, then banked into a memory and finally applied to the screen to show the effect.
a prosessor is a calculator that does one event at a time. Thus it's so fast, it seems it's doing a hundred of things as the same time, but it's all one huge queue of binary 00011000100101010 running
The quad processor etc. Can run 4 things at the same time I guess(simplified) and then the GPU has its own memory for shaders and for other things like textures, But i dunno do they usually have multiple processors(?) But well. It's always 1 calculation for 1 processor..
hmmmh.. that didn't compile