Creating a new object of type ActionListener (which is an interface), but it is defining the behavior for the interface by implementing the actionPerformed method.
BTW, the use of Anonymous Inner Classes is great for exactly that type of example, handling events from the user interface.
I can understand your confusion but you should really treat this as a way to create Inner Class then treating as an Interface. In the history of Java, there was one release back in the days of Java 1.1 where they removed Anonymous Class. Argument was exactly what you said. However, the lazy Java programmer who already used it made an out cry and they put it back. Still, in realistic point of view Anonymous Class removes unnecessary Java files.