Throughout the decades we heard that the heart is the only muscle whose nervous system is not acting. So who is he responsible for organising the heartbeat and its roles?
The Sinoatrial Node is a ganglion (clump of nerves) attached to the heart, which regulates heartbeat independently from the brain (http://en.wikipedia.org/wiki/Sinoatrial_node).
Heart rate can also be influenced by hormonal responses produced by the autonomic nervous system. To quote Wikipedia:
While heart rhythm is regulated entirely by the sinoatrial node under normal conditions, heart rate is regulated by sympathetic and parasympathetic input to the sinoatrial node. The accelerans nerve provides sympathetic input to the heart by releasing norepinephrine onto the cells of the sinoatrial node, and the vagus nerve provides parasympathetic input to the heart by releasing acetylcholine onto sinoatrial node cells.