To "drool" literally means to let saliva spill from your mouth.
Babies drool. Saliva drips from their mouth, often hanging in long strings.
Dog of some breeds (Newfoundlands! Sweetest dogs in the world!) drool a lot.
When you smell or anticipate delicious food, you salivate. The idea of "drooling over" something is that you salivate so much that are no longer able to contain your saliva... or you are so excited that you lose control... and you drool. So it carries the idea of really wanting something and being so excited that you have lost control.
So we can talk about "drooling over" food, and by extension, metaphorically, we can talk about "drooling over" a new car or a business opportunity.
The commonest usage refers to someone "drooling over" someone else who attracts them romantically. Obviously this is a somewhat insulting and disrespectful description, and the crudely physical metaphor suggests a crude physical attraction.
Here are some examples of use I got from a search in Google Books:
"I caught Connie Sue practically drooling over the chocolate truffles I'd set out."
"Larry used it to buy a used Speed Graphic 4x5 camera he had been drooling over."
"And if he was drooling over the girls, it was nothing compared to the way they were drooling over him."