This is using the Gestalt principle where we are using positive and negative space. The negative space of the coffee cup is actually a person talking and the top of the coffee cup comes out to be a thought bubble.