Prev: How did someone make this??
Unicode, the technical standard describing what text symbols exist in computers¹ and how they are encoded², has a block containing Egyptian Hieroglyphs. And since there exists an Egyptian Hieroglyph depicting a penis³, they included it in the standard. And since most computers follow that standard, they can display a penis.
You can check out unicode characters for example here:
1) There do actually exist different standards describing which characters computers should use and how they should be encoded. These days pretty much everyone uses UTF-8 (Unicode Transformation Format) because when exchanging data between computers or programs everyone must use the same encoding to get readable results.
This also means that unicode must (try to) support pretty much everything any human could ever want to write, which means it includes many things like mathematical symbols, special symbols for just about every language, emoji, combining characters that modify other characters, a variety of spaces, box drawing symbols, control characters for eg. text direction, ...
2) Which is actually somewhat complicated. Unicode assigns each symbol a number, but then the text (sequence of symbols) needs to be converted into a sequence of bytes. This is done via the Unicode Transformation Format, which actually results in different characters needing differently many bytes to store.
Also, certain emoji (flags, anything with skin colors or gender, emoji depicting multiple people) are actually multiple characters that get squished into one symbol when rendered.
3) There actually exist three. The above, a version with cloth (𓂹) and one with emission (𓂺).
Also the unicode standard defines words like character, symbol, glyph, ... to have exact meanings, I used the interchangeably here.