"Ruin" means to break or damage something. For example, you might say "I dropped my phone and ruined it," "I spilled wine on my shirt and ruined it." In these cases, you damaged the items and they're no longer good. You can also use "ruin" to mean you caused something to fail, such "I didn't study and I ruined my chances of getting into a good school," or "you showed up and ruined my date!" In these cases, someone's action caused negative consequences. "Ruin" generally means that the item or situation can't be fixed.
"Screw up" and "mess up" can both be used interchangeably and have a similar meaning to "ruin," but it's not quite the same. If you make a mistake you might say "I screwed up," or "I messed up my chances of getting that job." You can also use it when you damage something, such as "I messed up the paint on my car when I hit a post." However, "mess up" and "screw up" don't necessarily mean the item/situation is beyond repair.