A "funky" smell or odor is the smell of something that's a little bit rotten, moldy, sweaty, etc. You use it like this:
There's a funky smell in here.
There's something funky in that closet.
Other bad smells like the smell of chemicals are not usually called "funky".
"Funky" is a slang word, so you use it in casual situations.