We are travelling to South Africa from Colombo, Sri Lanka and the layover is 12 hrs.
Does the airline provide hotel accommodation for this period.
South Africa passport holders need a tourist or transit visa to leave the airport transit area in UAE. You don't need a visa if you remain airside.
You may apply for the e-transit visa or e-tourist visa in advance through the Etihad web site. You might wish to obtain this in advance even if you didn't plan to go landside, as visa on arrival is at the discretion of the immigration officer for nationalities that are not automatically eligible for it.
You will need to contact Etihad or check your ticket to find out if you are eligible for a free hotel stay. This is only given to passengers with tickets in certain fare classes. AFAIK only Business and First tickets get a free hotel stay.