A secret identity is a person's alter ego which is not known to the general populace, most often used in fiction. Brought into popular culture by the Scarlet Pimpernel in 1903, the concept is particularly prevalent in the American comic book genre, and is a trope of the masquerade.
In American comic books, a character typically has dual identities, one public and one secret. The public identity being known to the general public as the "superhero persona" and the other being the secret identity. The private or secret identity is typically the superhero's legal name, true identity, and/or "civilian persona" when they are not actively assuming the superhero persona. It is kept hidden from their enemies and the general public to protect themselves from legal ramifications, pressure, or public scrutiny, as well as to protect their friends and loved ones from harm secondary to their actions as superheroes.
Occasionally, this trope is inverted. Two prime examples of this are the Marvel Cinematic Universe films Iron Man (2008), where the film ends with the lead character declaring to the world “I am Iron Man”, and Spider-Man: No Way Home (2021), where it ends with Peter Parker's civilian persona being permanently erased from the memory of the entire world, as a result of a spell by Doctor Strange.