How do I make faces and vertices invisible in viewport?
In your first picture, we see a cup of tea in object mode. No big deal.
In the second one, we see a cup of tea in edit mode. With a subdivision modifier display. But with optimal display On.

My guess is, your tutorial shows you a mesh modeled with a subdivision modifier, and the authors has it set so that in edit mode, the subdivision modifier displays a preview of its effect (that's the default behavior), but has the Optimal Display option checked on so that it doesn't draw the created geometry's wires: