The word niche can mean many different things. In general, it refers to something small or something specific.
When used in conjunction with the term marketing, the word is transformed to mean making and selling a specific product for a very specific market. The opposite of a niche product is a commercial product, which is meant to cater to the masses or everyone.
In order to determine the niche market of a product, companies analyze the target audience in terms of demographics, including age, gender, marital status, area/region, race, ethnicity, job/profession, salary grade, religion etc.
In some cases, one factor may have the heaviest weight with the other factors having much less effect. Examples of such cases would be tampons wherein the most significant factor would obviously be sex (females) and the next factor coming to play will be age (usually teens to early fifties).
A common misconception about niche marketing is that it caters only to a small audience. The truth though is that it can cater to a very large audience, as long as the target market is very specific. As the example above shows, all females from their teens to fifties can be considered a niche market for a specific product.
Furthermore, niche marketing can also refer to niche advertising, which is position or promoting the same product to appeal to different market segments.