The answer is, of course, "it depends".
The simplest way is to run a script once every so often from cron which copies modifiy files from one server to another. rsync is super for this, as it if very efficient so long as the amount which has changed is small compared to the amount which is the same on each subsequent copy. This method is suitable for replication where you do not mind there being some delay, and hence the possibility that you will "miss" some updates when fail over occurs, but it won't be so many, depending on how often the job runs.
At the other end of the scale, if you require transaction level synchronisation it is a bit more complicated. Failover database systems typically have this functionality built into the database engine, or as a bolt-on for that engine. I'm not so sure about replicating filesystems which have to be transaction-synchronised...