There are ticket counters located on the piers where you can easily purchase the tickets. Alternately, I suggest you use the Octopus card, which is a stored value card that you can buy at any MTR station. You can store money in the card and use it for all your travel in Hong Kong, including MTR trains, buses as well as ferries. You can have your remaining balance refunded at any time by returning the card at any MTR station.
Sorry for the delayed response, you purchase at the ferry terminal via the token machines. Have fun.
Either cash to buy a token or better to use an Octopus card which can be purchased at a station for MTR travel too.
At the ferry terminal there is a token machine to purchase a token and then you put it into the turnstile
Best to get an Octopus card which you can get at any train station and every 7/11. You need to pay a deposit for the card which is refundable when you return the card at the end of your trip, it can also be used at 1000s of retail outlets such as 7/11, Starbucks etc for payment. Or you can buy a souvenir card to take home ($HK40 plus the fares). You can buy tickets at the pier for $HK2.30 for a single trip if you wish but the Octopus card is by far the easiest option.
Get quick answers from Star Ferry staff and past visitors.