The new antenna will come with a bracket.... if you purchase an antenna designated for sailboats..... you can tell the differences when you compare with other styles... Pop rivets or self tapping screws to attach the bracket to the mast, be sure to protect the areas where dissimilar metals come in to contact with an anti electrolysis product... here's one for example.
You'll need to use coaxial wire to connect antenna to radio...you can run the line outside the mast to the deck connection using cable ties to secure it. Or you can run the line inside the mast which will require drilling a hole near the bracket and one at the base to exit. Before you decide, inspect the existing wiring in your mast, you may discover a more convenient way to get the wire into the cabin.
How you connect the wire at the base is up to you... but one way is to insert a water tight connecter between the mast wire and the cabin wire... the connector can be through deck mounted near the mast base.