The ball ricocheted so violently off Castano's face that it flew to Marlins third baseman Joey Wendle for the out, while Castano himself fell to the floor with his head in his hands.
Marlins' trainers, manager Don Mattingly and catcher Jacob Stallings, ran to the mound to check on the 27-year-old, who was treated on the pitch but able to walk off the field.
Once he had stood up, Solano put his arm around him and the two exchanged words before Castano headed for the dugout.
"I'm not sure what happened," a bandaged Castano told reporters after the game.
"I was down for a second. I was a little out of it. When I woke up, I asked, 'What happened?' I'm much better now. I'm a little bit tired, but I'll be all right."
Marlins' manager Mattingly said that the ball's impact was partly lessened since it hit the bill of Castano's cap, according to ESPN.
"It's a little bit scary," Mattingly said. "Your biggest fear is damage. He's about as good as could be expected."
The Marlins later announced on Twitter that Castano had suffered a forehead contusion with a mild concussion, and will be evaluated further. Castano also released his own statement on Twitter.
"Thank you for everyone for the love, support, and prayers. I'm doing well and it could have been a lot worse," he said.
"Beyond thankful for the efficiency and kindness of my coaches, trainers, teammates and Solano, what was shown to me today truly goes beyond the game.
What a sobering reminder on the brevity of life, thankful to have my assurance in Christ. Romans 8:28."
Miami went on to win the game 7-6 following a late rally in the top of the 9th inning led by a homer from Jesús Sánchez on a fly ball to right field.
Its next fixture is on Friday when it will face the New York Mets.