"The agreement is pending the formalisation of the contract between our club and the Spanish international forward," said a statement issued by Atletico.
"The English club has authorised Diego Costa to travel to Madrid in the coming days to undergo medical tests and settle his contract with our club."
A statement from Chelsea said: "The transfer will be subject to the agreement of personal terms and a medical."
Costa joined the west Londoners in July 2014 for 32 million euros. He was part of Jose Mourinho's squad that swept to the 2015 title and which also claimed the League Cup. He was one of the players said to have underperformed at the start of the following season which led to Mourinho's dismissal.
Under new boss Antonio Conte, Costa was one of the star turns as Chelsea recaptured the title. But theirs was a fraught relationship. In January, an argument between Costa and a fitness coach over an injury developed into a row with Conte.
During the summer, Conte contacted Costa to tell him that he did not feature in his plans for the 2017/2018 season. Costa decamped to Brazil and refused to return to London. Alvaro Morata was signed from Real Madrid to lead the Chelsea attack.
Costa scored 59 goals for Chelsea in 120 games and was one of the most feared forwards in the Premier League capable of moments of brute power and dazzling finesse.
His gifts will not be on parade until next year, however. Atletico have been barred from fielding new signings until January.