That is Akinator, often called the Web Genie.
You think of a character, real or fictional, and it asks a long chain of yes/no questions before naming them. The trick is a large database of characters cross-referenced against traits, so each answer eliminates a swathe of possibilities until only one remains.
It works best when you pick someone genuinely famous — the more obscure your choice, the more likely it is to guess wrong on the first three attempts. There are also mobile apps if you would rather not use a browser.