Several cargo and passenger ships service Tokelau from Apia in Samoa, with a departure roughly once a week. See the schedule on www.tokelau.org.nz for sailing times; book through the Tokelau Apia Liaison Office in Samoa.
There are no official harbours in Tokelau and anchoring offshore is not easy, especially in an offshore wind. The sea floor drops off sharply beyond the coral reef, and the water is too deep for most anchor chains. The channels blasted through the coral are shallow and intended for dinghies only.