Genre is the French word for type, and can be used to categorise most media texts. A genre is established when a number of films all share clear codes and conventions, creating a new style. The advantage of this is that different audiences will have different favourite genres, so each group can be targeted (for example women will stereotypically watch romantic comedies). If the codes and conventions are followed then the director can confidently create a piece that they know the audience will enjoy. The audience is satisfied because when a certain genre is promoted to them, they know what they are buying into and are assured they will enjoy it.
There is much debate among film students as to whether film noir is a genre or a style.