Please note that this is is a very limited explanation. Refer the docs.
To answer your question 1 "How these 2 are different?" - Both KafkaListener and KStream consume messages from Kafka topics. However they differ in the way they maintain state. The KafkaListener does not maintain state. It consumes messages as it comes. KStream reads the topic as a continuous Stream of messages.
Lets assume that a topic sends lines and we maintain a count of the number of each word. So after we send the topic these 2 lines,
Hello good morning,
Hello thanks
We will have the word counts - Hello 2, good 1, morning 1 & thanks 1.
KakfaListener can be used to keep this word count manually. The developer can store the words in a static Hashmap and keep the count. KStream will do it naturally because it reads the topic as a stream -
it is designed to operate on an infinite, unbounded stream of data
The KStream example explains this in good detail.
To answer your question 2 "Which one to prefer in which scenario?", Use KafkaListener if you need to consume messages without maintaining state..like a pipeline, to take info from source to sink. Use KStream if your messages are related to each other - like find total number of a particular word in all the messages (roughly similar to a GROUP BY in SQL).