Casillas and Buffon are widely regarded as two of the best goalkeepers of their generation, having helped their respective countries to FIFA World Cup glory.
Casillas was still contracted to FC Porto but had not played active football since suffering a heart attack in May last year.
The 39-year-old announced his intention to contest for the Royal Spanish Football Federation presidency in February but later withdrew his candidacy.
Buffon, who is also at the twilight of his career, was one of the first people to bid Casillas farewell from the beautiful game.
"They say competition makes us better than others but not perfect faced with ourselves," Buffon wrote on Twitter.
"Maybe this futile pursuit of perfection is what made us who we are.
"#Grac1as Iker, without you, everything would have been less meaningful."
In 16 years at Real Madrid between 1999 and 2015, Casillas won three UEFA Champions League trophies, five Spanish La Liga titles and two Copa del Reys, amongst numerous other trophies.
Casillas, who holds the record for most appearances in the history of the UEFA Champions League (177), captained Spain to win the European Championships in 2008 and 2012 as well as the FIFA World Cup in 2010.