I am interested in the mechanism by which the Supreme Court casts votes on a ruling.
Do they do it by secret ballot? Or is it as simple as a show of hands?
Does a Justice have the opportunity to change their vote based on votes of other Justices?
Does the US Supreme Court vote using secret ballots?
No. The procedures used by the Court are given here: Forming opinions.
Educational resources, provided by the Court are given here: Supreme Court Deliberations.
Or is it as simple as a show of hands?
At the end of a week in which the Court has heard oral arguments, the Justices hold a conference to discuss the cases and vote on any new petitions of certiorari. The Justices discuss the points of law at issue in the cases. No clerks are permitted to be present, which would make it exceedingly difficult for a justice without a firm grasp of the matters at hand to participate. At this conference, each justice—in order from most to least senior—states the basis on which he or she would decide the case, and a preliminary vote is taken.
The votes are tallied, and the responsibility for writing the opinion in the case is assigned to one of the justices; the most senior Justice voting in the majority (but always the Chief Justice if he is in the majority) makes the assignment, and can assign the responsibility to him- or herself.
It would be most difficult to assign the responsibility for writing the opinion without knowing how each Justice voted.
Would a Justice have the opportunity to change their vote based on votes of other Justices?
Votes at conference are preliminary; while opinions are being circulated, it is not unheard of for a justice to change sides. A justice may be swayed by the persuasiveness (or lack thereof) of the opinion or dissent, or as a result of reflection and discussion on the points of law at issue.
In addition to the Court's opinion (the majority opinion), others may be written.
A justice voting with the majority may write a concurring opinion; this is an opinion where the justice agrees with the majority holding itself, but where he or she wishes to express views on the legal elements of the case that are not encompassed in the majority opinion. Justices who do not agree with the decision made by the majority may also submit dissenting opinions, which may give alternative legal viewpoints.