This is the 2784th most frequent Polish word.
głowami
The Polish word "głowami" means "with heads" or "by heads" (instrumental plural of "głowa" - head).
Here, "głowami" is the instrumental plural form of "głowa" (head), used to indicate the means or method of performing the action, in this case, the nodding with the heads.
Dzieci machały głowami na znak zgody.
The children nodded their heads in agreement.
In this sentence, "głowami" is the instrumental plural, describing the characteristic of "lions" as having heads (of humans).
Na stole leżą rzeźby przedstawiające lwy z głowami ludzi.
On the table lie sculptures depicting lions with human heads.
"Głowami" here is instrumental plural and describes the state (lowered heads) in which the bowing is performed.