A query is simply what a user writes in the search engine text box. A query is something that you can not predict in the digital marketing world. The best you can do is narrow down their query with a specific keyword. The difference between a query and a keyword is the fact that users use queries and marketers use keywords. So with that said, a query is what users are actually typing in the search bar. While keywords are the terms that marketers are targeting.
E.g. “The user queried "cheap blue jeans online" in hopes to find an affordable pair of jeans.”