Boats must be registered with the class association to be legal. You register your boat with your local country association (NOT with the World Association), who will issue a sail number, may if the boat is new issue you with an ISAF plaque (if they don’t, you have to get one from ISAF yourself – see below) and collect any fees due.
Boats must be registered when first built, and re-registered upon change of ownership. ISAF new boat fees are only payable (and plaques issued) on a boat when it is first built, not when it is subsequently re-registered. When a boat is sold to an owner in a different country, the association in the “new” country will issue a new sail number.