Confused on 1st hurdle. >>>Warning Noobie

electrofunkdaddy:
that makes sense that the pins are ground(sink) , but how does that work? how does it know, when to sink of apply current?
or changing the PIN mode output to LOW or High, if they are acting are ground what does this setting change, I see why LOW\HIGH would work when they are supply E\I.

When the pin is LOW there's a transistor that connects it to ground. Any current arriving at the pin will go through the transistor to ground.

When it's HIGH, that transistor is switched off and a different transistor connects 5V to the pin.

nb. The transistors have a 40mA limit to the current they can handle.