here are four EPROM cells. the critical element is a transistor (circled) that has a floating gate -- a control electrode with no external connection! modern flash memories also use floating gates, but the construction is quite different.
the first EPROM devices were intended to be erased using X-rays, but ultraviolet light turned out to be a more practical method (X-rays can damage chips).
If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/tubetime/statuses/114435725038397736 on your instance and quote it. (Note that quoting is not supported in Mastodon.)