Actually, these questions vary wildly from db to db. And from replication engine to replication engine. There are external engines, trigger based engines, log shipping engines.
And, MySQL Replication is easy to setup, but I hope you never experience a failure, as it is know for its unreliability. Seriously, look it up, it's not at all uncommon for MySQL replication to just silently stop working.