The weight is to hold your line and bait in one position ( in the surf ) while you fish. It keeps the current from moving it around or even from washing it back into shore.
The weight of it is determined by the current , the stronger the current the more weight that is necessary.
Normally the weight is attached to a three way swivel on the line with a drop off of lighter weight line so if it gets hung up it can break off. From the weight then a length of line is from it to the hook. Again that length of line is determined by the angler.
Think of it as the line from the rod to the three way swivel with the weight off it and then another length of line from the weight to the hook. The swivel looks like a "T" with one line attached to it , then the drop off and weight followed up off the straight part of the T with the line to the hook off the other end of the top of the T.
Or you could do it this way........http://surf-fishanybeach.com/start-surf ... hing-rigs/
The local bait shop would be able to tell you what length is necessary due to water conditions and what weight of sinker.