It comes from the Latin word "tendere," which means "to stretch" or "to aim."
Here's how it works:
* tend (root) + -tion (suffix) = attention
So, "attention" literally means "the act of stretching towards something" - in this case, focusing your mental energy on something.