I want to compose a song for a woodwind or a brass instrument. I am not too experienced at composing and am wondering what a fanfare is and what are some good and/or famous examples of them. Also, which instrument(trumpet?) would be best to compose and play with. Any key is fine.
A fanfare is a particular style of music, that's often used to introduce something important, or get people's attention. They are not a subtle piece of music. They're usually pretty short and sweet, as well.
The most idiomatic instrument for a fanfare would be a trumpet, or its older cousin, the bugle. Writing for bugle is a little bit more complicated, because it can only play a limited set of notes. The trumpet has valves, which allows it to play a much wider range of notes.
There are many examples of fanfares which you could look at for inspiration, but I'd suggest just using Google and/or YouTube. If it's an older piece of music, you should look on IMSLP for sheet music. Here's a link to the fanfares category.