Guinea Smells

Do guinea pigs let out scents when doing certian things? I noticed when my guinea doesn't like something he stinks and hes like letting gas out of his butt or smth? And then when they're trying to dominate, they stink badly