Table corruption can happen from a variety of things. It's more prone to happen on a shared server. Some of the reasons would include:
- Hardware issues, motherboard/cpu/memory or a slow/bad hard drive.
- The mysql process being killed while the database is being written to.
- The computer/server being shutdown unexpectedly.
- Certain versions of MySQL have bugs in them that are more prone to corruption. So, it's important for the host to be on top of things and upgrade accordingly.
In short, the more stable and up to date the server is the less frequently you should have table crashes. For example, here, we haven't had a single table crash.
There are no real preventative steps that can be taken. If you have frequent corruption issues, then it's more than likely related to something above.
Having a properly tuned mysql server can help. If you're on a hosting company that just throws up a mysql server and uses the default configuration, that certainly isn't going to help, especially if you're using shared hosting.