Actually both ! Thanking them means you liked the answer and voting is a courtesy you give for liking the answer or it was helpful to you. I usually always give both when I like an answer. Just good manners.
Good to know, thanks guys!
Thank is visible while upvote is kind of anonymous. Upvote only determines the order in which the answer flow while thank will be a statistic figure beside the thumbs up icon.