The triceps, commonly called the triceps brachii, is a three-headed, biarticular muscle that’s located on the posterior compartment of the arm and which extends the elbow joint. It’s made up of a medial, lateral, and long head, with the former two heads originating at the humerus and the latter arising from the scapula.
The triceps brachii long head originates from the infraglenoid tubercle of the scapula, which is the lateral part of the scapula that’s located inferior to the glenoid fossa. 
The lateral head, which is widely believed to be the strongest of the three triceps brachii heads, arises from the posterior and lateral surface of the humerus and is superior to the radial groove (also called the radial sulcus). The lateral head of the triceps brachii also has muscle fibers that connect to the intermuscular septum. 
The medial head is the smallest head of the triceps and, like the lateral lead, originates on the posterior surface of the humerus. It also connects to the lateral and medial intermuscular septum. Unlike the lateral head, however, the medial head of the triceps brachii is inferior to the radial groove.
The three heads of the triceps brachii converge at a common tendon, which inserts into the olecranon process of the proximal ulna and blends with the forearm fascia. (physiopedia)
The triceps brachii is innervated by the radial nerve (C6 innervates the lateral head, C7 innervates the long head, and C8 innervates the medial head). [3
] The radial nerve is the nerve that arises from the posterior cord of the brachial plexus, which is a network of nerves that supplies the shoulders, arms, and hands.
Research from the esteemed Surgical and Radiologic Anatomy journal also shows that in some cases, the long head is innervated by the axillary nerve. [4
Similarly, a 2008 study from the Clinical Orthopaedics and Related Research journal demonstrates that the medial head of the triceps brachii is sometimes innervated by the ulnar nerve due to its insertion at the olecranon process near the forearm. [5
The triceps brachii gets its blood supply from the deep brachial artery, which is a blood vessel that originates from the posterior and lateral sides of the brachial artery.
The long head also gets its arterial supply from the posterior humeral circumflex artery, which arises from the third part of the axillary artery.
The primary triceps brachii function is elbow extension, which is to say straightening the arm. The medial head is always active during elbow extension, whereas the lateral and long heads only become active when the triceps are required to push against resistance.
Due to being the strongest head, the lateral head of the triceps brachii consists of mainly fast-twitch type IIb muscle fibers that enable it to contract forcefully under resistance. [6
On the contrary, the media head is a slow-twitch dominant muscle that consists of predominantly type I fibers.
Only the long head crosses the shoulder joint and attaches to the scapula. As such, the long head assists with shoulder extension, shoulder adduction and also helps to keep the glenohumeral joint stable by holding the head of the humerus in the glenoid cavity, thus preventing displacement of the humerus.
The biceps brachii is the triceps brachii antagonist; when the triceps contract, the biceps relax.