From Erlang Community
Behaviour modules encapsulate some certain functionality for reuse by other modules. The definition of a behaviour includes not only it's exported functions but a list of functions which a callback module must implement. OTP includes several behaviour modules with the most common being gen_server and gen_fsm.
To declare your module as a behaviour callback module you include the -behaviour attribute.
Note: All this really does is to enable compilation time checking that you have exported the required callbacks.
A module which uses the gen_fsm behaviour must export the callbacks which the gen_fsm module calls to handle events. These include handlers for common gen_fsm events as well as the handlers for your user defined states.