These skunky odors are from gases released by bacterial decomposition of moist organic material (i.e. sewerage). The particular gases are methane and/or hydrogen sulfide.
If you smell these gases in your bathroom, it means that your fixture traps are malfunctioning. The prupose of the drain waste and vent plumbing is to drain waste into the sewer and keep sewer gases out of the living space.
There are many possible causes of the problem you describe. If your plumbing system is properly designed, the only one that you can easily fix would be a partially occluded trap/outflow pipe, which contained rotting organic sludge. You could try snaking it out and/or using a commercial drain cleaner (which you should not use if you have a septic system). All of the other causes of this problem (restricted or poorly designed vents, faulty drain slopes, etc.) really require diagnosis and treatment by a licensed plumber.
Sewer gas in the home is more than unpleasant. It is a serious health problem. If you can’t fix it with a simple home remedy, call in the doctor…
NtP