It's a simple and straightforward phrase that expresses that Tomas is not acting rationally or is behaving in a way that is considered abnormal.
Here's a breakdown of the phrase:
* Tomas: The name Tomas
* es: The verb "to be" in the third person singular present tense
* loco: The word for "crazy" or "mad"