How do online transactions work?

Many people have done online transactions, but not everyone understands how it works. There is nothing complicated for the user, but the