Genre means “kind of.” So on a very basic level a comedy is a funny kind of movie, a thriller is a thrilling “kind of” movie, a melodrama is a dramatic kind of movie. Understanding genre is vital for anyone in the movie business.
Genre is important because it sets audience expectation and it describes the sort of experience on offer. Often the audience is disappointed not because the film isn’t any good but because their expectations (genre) were not met.
Pay attention to what you “feel” when you write. If you’re writing a comedy you should feel funny; a thriller… tense, a horror… repulsed, a romance… romantic etc.