What's going on behind the scenes?

ok, to the wikipedia. I went from flash memory -> floating gate mosfet and I just wanted to be sure that I'm getting the general idea. So a floating gate mosfet is sort of a capacitor and a transistor combined? It gets a charge and then keeps it until the next time?

Now this has raised some more questions. So the Uno for instance has 32K of flash, 2K of SRAM, and 1K of EEPROM. I've used the EEPROM before and get the idea behind that. I'm thinking the sram is used for variable storage etc during execution and the flash would hold the code itself. So what happens if the sram gets full? would it lock up, maybe start overwriting old variables, or start filling up something else perhaps?

PORTB |= (1<<PB5)

oof. not good. However, I do like the 40 times faster bit. I seem to recall from my browsing that the digitalWrite command actually checks that the pin is indeed the state you specified? Can you use code like PORTB |= (1<<PB5) mixed in with 'normal' code, like so?

digitalWrite(pin, state);
PORTB |= (1<<PB5);
for(int i = 0;...

I think I saw an instructable the other day about making one's own flash storage from transistors, I may have a look at that and see if I can reason out some facts.