What happens if they continue to refuse to testify?
They go to jail.
What action can be taken against them?
They are imprisoned until they testify.
Is refusal to testify a crime?
Yes.
Or just contempt of court?
Yes. Which is a crime.
What sort of penalty are they looking at?
They can be detained by the court until they testify. There is no legal limit to how long this can go on.
However, there is a practical limit in criminal trials because the accused is entitled to a speedy trial which may mean the trial has to conclude without the testimony. Similarly, practical considerations in civil trials may lead to the party calling the witness to give up. That said, this type of detention can run for days to months to even years.
As this is not punishment for a crime, it does not attract the same due process protections, particularly since the recalcitrant witness hold the key to their cell - they can leave anytime they want, all they have to do is testify.
Whether the witness ultimately testifies or not, they can be charged with criminal contempt of court. This is a normal criminal charge and follows the normal court procedure - bail, proof beyond reasonable doubt, and sentencing in accordance with the punishment laid out for the crime. I believe the longest sentence ever imposed for this type of contempt in the US was 20 years in Illinois on Terrell Geiger.