Whether you play blackjack online or at a real-world casino, the fundamental rules remain the same.
Since there are no actual cards present when playing at an online casino, the cards dealt are decided by a random number generator, but this has no real bearing on how the game is played.
Now that most online casinos provide live blackjack, the experience is more comparable to that of a physical casino. With live online blackjack, you compete with a real dealer while using real cards, and the action is streamed live to your computer.