This is not a very important concept to know. But anyway, listeners are those which will be listening to any state change(event).
So in case of WebDriver, whenever anyone clicks on a button on a web page, then automatically a method will be called (actionPerformed() in ActionListener case).
But in case of TestNG, there are the actual "listeners" which listen (here the method gets called automatically) to the test execution events. A few examples are: onStart(), beforeStart(), afterFinish(), and onFinish() etc. Mostly, the TestNG automation teams implement their own custom listeners for custom Logging and reporting.
WebDriver listeners too do a similar job...of logging and/or reporting. But then both of them work on different event sets. WebDriver works on different automation events whereas TestNG works on different test's related events. The point to note is that, with WebDriver listeners, "Logging" happens before/after event occurance such as click/SendKeys etc.