A secret identity is an element of fiction wherein a character develops a separate persona (usually adopting a pseudonym), while keeping their true identity hidden. The character also may wear a disguise (ranging from makeup or a mask, to a complete costume). A character may have several types of secret identities simultaneously (such as adopted names, pen names, undercover identities, and crime fighting codenames).
The use of secret identities dates back to early 20th century with characters such as The Scarlet Pimpernel, The Lone Ranger, and Zorro. Starting in the 1930s, the concept of a crime-fighters, superheroes, and vigilantes (and their adversaries) adopting secret identities became more widespread in dime novels, pulp magazines, comic books, old-time radio dramas, movie serials, and other popular fiction. Such characters remain popular to this day.
The artistic purpose of the secret identity on the part of the writers is that it allows the characters to have ordinary lives which can allow for human drama as well as create tension with the effort needed to preserve the secret. This can include challenges such as throwing off the suspicions of associates who suspect, and the need to quickly improvise means to get out of sight to change identities. And superhuman characters may benefit from an 'everyman' aspect through having a secret identity, giving them a sympathetic link to their audience.
For example, Captain Marvel's secret identity is a boy named Billy Batson - a deliberate attempt to play on the daydreams of a young readership. Sometimes the distinction as to which persona is the "real one" may be blurred or confused, as has sometimes been the case with Clark Kent and Superman. (For example, in the television series Lois & Clark: The New Adventures of Superman, after Lois Lane learns that Superman is Clark Kent, he discusses his dual identity with her.
"Clark Kent is not a disguise. 'Clark is who I am', while 'Superman is what I do'.")