Well, to replace it:
1) Buy a new one that is the same size or larger (preferalbly larger).
2) Install the new drive into the system
3) Use a tool such as clonezilla to clone the old drive to the new drive
4) Remove the old drive
Now, that is the basics. As for the more details, it all depends on what you are moving from and moving to and possibly issues with the OS. For most people the SSD is the boot/OS disk. And in a lot of cases, they will simply take this as an opportunity to re-install the OS and clean out a lot of junk (especially in the case of MS Windows, all the patches on patches, and registry changes over time just tend to slow things down compared to a rebuild with just the latest service pack and/or build).
On the other discussions on failing SSDs, I have had very few occasions where they have simply failed and are inaccessible. I have had a couple fail to a read-only state (drive reached max writes for the memory), however, the drive's data could be copied from it (you could not boot from it as the OS wanted to open logs, etc., but if you booted from CD/DVD/USB/Network you could access the data). This took years of massive writes to the drives that failed to read-only, and tools like Crystal Disk Info and Smartmontools confirmed the issue.