Onomatopoeia refers to the formation of words, which (when spoken aloud) imitate the sounds related with the things/actions they refer to.
Sniff: Smell, breath, sound of inhaling air through nose, etc.
Tweet: Chirp, chirrup, chatter of a young bird, etc.
The dog was sniffing the biscuit tin.
The birds were tweeting noisily in their nests.