It's likely you're referring to onomatopoeia, which is a figure of speech that uses words whose sound imitates the sound they describe.
For example:
* Buzz for the sound of a bee
* Meow for the sound of a cat
* Bang for the sound of a door slamming
Let me know if you have any other questions!