<p>Every so often I get an error saying one of my tables "is marked as crashed and should be repaired". I then do a REPAIR TABLE and repair it. What causes them to be marked as crashed and how can I prevent it? I am using MyISAM tables with MySQL 5.0.45.</p>

It could be many things, but
MySQL Performance Blog
mentions bad memory, OS or MySQL bugs that could cause hidden corruption. Also, that and
another article
mention several things to keep in mind when doing crash recovery.