Most wood guard rails use a top cap to finish the top of the rail. This component is usually a 2x6 board laid flat and run across the narrow side of the 2x4 top rail. The purpose of the top cap is both aesthetic and functional. The flat surface provides a convenient ledge to set drinks on top of or to rest against. A top cap also covers the baluster connections from the top side to prevent them from loosening.
Some deck builders install a continuos top cap run across the tops of the rail posts. This technique adds strength to the rail and a consistent horizontal element to the deck. Others prefer to break the top rail between elevated rail posts. This allows a rhythm to develop between posts and allows you to install decorative post caps.
Many low maintenance rails such as composite and metal don't use top caps. It is one advantage of wood rails. Many people enjoy having a flat surface on the tops of the guard rails to set things.