In The Comics:
A trusted guardian to Asgard and long-standing ally to Thor, Heimdall is a pale, intimidating and stoic figure, faithful to Odin and the permanent guardian to the Bifrost.
Born of nine mothers and a skilled warrior, Heimdall's ability to hear and see things 'as far as creation' and to perceive all things across time and space makes him the perfect guardian for a realm of gods. He's often tricked or thwarted by Loki, the Trickster, but is largely able to keep Asgard safe from harm.
In the Film:
Portrayed by the impressive Idris Elba, Heimdall in the films is much the same as in the comics, being the guardian of the Bifrost and having great sight.
In Ragnarok, Heimdall uses his sight to show Thor the destruction wrought by Hela, and his faithfulness to Asgard's people sees him hiding and protecting them from attack. From Ragnarok onward, he no longer wears his horned helm, abandoning his ceremonial garb when he hid in Asgard's mountains.
His power to 'beam people up' using the Bifrost seems to extend even after Asgard's destruction, when he uses the last of his considerable power and dark magic to transport Banner to Earth.