Generally this happens when someone has mistakenly put index.php from a theme in the WP install folder, where it overwrites the index.php that is the main WordPress file.
Download WordPress again, and take the one file, index.php from its root folder, replacing the file you now have as index.php
It sometimes means someone has loaded an entire theme into the root WP folder, also