Depending on the type of hand guard you use you will use a different barrel nut, this one below is a standard barrel nut, it requires a special tool to tighten onto the upper receiver over the barrel.
This is the tool you use to tighten the Barrel Nut, this tool will usually work with other barrel nuts as well, for example if you decide to use a free float hand guard that comes with its own barrel nut. The three spikes at the one end will rest into three holes or between three teeth on the barrel nut.
This last picture is of a UTG free float system, one of the cheaper free float hand guards but still effective at free floating the barrel. Notice the barrel nut that comes with this system, in this case the handguard will attach only to the barrel nut.