Despite being a partisan official, the speaker (or whoever is presiding) does not vote unless in breaking ties in accordance with the Rules of the House of Representatives.
A speaker is usually elected via majority vote via roll call of the representatives, after nomination at the start of each new Congress.
Usually, despite the current multi-party system used, only two representatives are nominated, with nominations being agreed upon before each Congress during caucuses between the administration and opposition coalitions, with the chosen candidate of the majority coalition being almost certain to win by a large margin.
The two competing candidates by tradition vote for each other; those who voted for the speaker-elect is assigned as the "majority" coalition while those who didn't are the minority coalition, with the losing candidate usually being named as minority leader.
The Speaker shall also determine, upon the recommendation of the Majority Leader, in consultation with the Chairperson of the Committee on Inter-Parliamentary Relations and Diplomacy, who shall constitute the House delegation to any international conference or forum of parliamentarians and legislators and the secretariat support staff to be mobilized for the purpose."