Villa, who this week agreed a move to New York City after helping Atletico Madrid win La Liga, has netted 56 goals in 95 games for the current world and European champions and was top scorer in his last two major tournaments.
The 32-year-old forward missed the 2012 European Championships due to injury, but found the net five times at the 2010 World Cup in South Africa and on four occasions at Euro 2008.
He travels to Brazil as one of four strikers named by Spain coach Vicente del Bosque, but revealed he will concentrate solely on club football after the World Cup.
"I don't like to say that I'm saying goodbye," he told Spanish TV station Cuatro. "But obviously at the World Cup I'll be playing my last games for Spain.
"Now I want to enjoy myself from the word go, put in a great World Cup and, why not, get another star (on the Spain shirt for winning the tournament)."
Villa also shed light on his decision to switch to the MLS with New York, even though the new franchise do not enter the league until 2015 and he is the only player in the squad at this moment in time.
"I still have a lot of football left in me," he added. "I want to make a name for myself and make people talk about David Villa in this part of the world (USA).
"I'm going to train, there'll be someone by (my) side the whole time. After the busy time I've had, it'll be good for me.
"I haven't had a summer holiday for a number of years and in these months I'll be able to recover well."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.