It depends on the state. The National Association of Secretaries of State has published a summary of the state laws regarding presidential electors, but in most cases the legislation doesn't make it completely clear how the process runs in practice - most just noting that the electors 'vote by ballot' or 'cast their ballots' in their own state capitals. Colorado's legislation, interestingly, states that the vote is taken 'by open ballot'.
However, there are videos of the electoral college meetings taking place, which shed light on the process. For example, C-SPAN's coverage from 2016. The first state meeting shown in the footage is in Illinois. First, vacancies in the electoral college are filled, and a Chairperson chosen. The Chairperson then lays out the process as follows:
All electors will be voting two ballots, one for President of the
United States, one for Vice President of the United States. The
ballots are located at your desk. Please mark your preferred
candidate. As I call each elector's name, you will step forward and
place your marked ballots in the ballot box located to our right along
She then calls each elector's name, and they do as instructed. The Chairperson, being an elector herself, then casts her own ballots. The ballot box is then taken to the bench, and are tallied. The result is announced, and each elector signs six copies of the certificate of the vote to be distributed to the proper authorities, in accordance with 3 U.S. Code § 9.
This answer is too short to fully describe the process in each state, but this procedure, taking about 20 minutes, seems to be fairly typical.
Images of two state ballots for the 2016 electoral college.
- Michigan requires the elector to vote for the presidential nominee elected by the people.
Refusal or failure to vote for the candidates for president and vice-president appearing on the Michigan ballot of the political party which nominated the elector constitutes a resignation from the office of elector, his vote shall not be recorded and the remaining electors shall forthwith fill the vacancy.
- Texas does not have the same requirement.