When you do something unknowingly, you're missing a piece of information, like when you unknowingly eat a chocolate-covered cricket that a friend passed off as ordinary candy. Yuck.
To act unknowingly is to be unaware or unprepared. You might unknowingly make your friend sad by telling her funny stories about your cat, not realizing that her own cat just died the day before. And the residents of your town will almost certainly be angry after learning they've unknowingly been drinking tap water that's not as clean as it should be. At the heart of this adverb is the verb know, "to have information or understanding."