The classic CSS-only trick animates width from 0 to 100% with overflow: hidden, using steps(n) so it advances one character per step. It's fiddly to get exact with variable-width fonts, so production code more often updates a text node's substring in JS instead.
For multiple lines, the common loop types a sentence, deletes it, then types the next. The cursor is usually a separate element blinking with steps(1).
When to use
Save it for one hero headline. Used on body paragraphs, it forces reading speed down and becomes annoying.