The first Iron Man comic was 'Tales of Suspense #39'. This comic laid the foundation for Iron Man's popularity and his subsequent appearances in various comic series and story arcs.
There are many speculations about the man in the iron mask. One theory is that he was an illegitimate son of Louis XIV. He was locked away with an iron mask to hide his identity so as not to cause a scandal or a threat to the king's power. Another view is that he was involved in some sort of political intrigue at the court. However, the exact truth remains uncertain and has been the subject of much debate among historians.
In the story, the man in the iron mask was a mysterious prisoner. His identity was kept secret, and he was forced to wear an iron mask all the time to conceal his face.
Iron Man's origin in the comics involves Tony Stark getting captured and using his engineering skills to create the first Iron Man suit to escape. After that, he continued to improve and develop the technology to become the hero we know.