When you play alone, the key is not so important, although harp players often prefer one key over another. Even if you always play alone, it is nice to have multiple harmonicas because if you play a long time on one it can get saturated.
When playing with another instrument, you must first tune the other instrument to the harmonica. Find the basic do-re-mi-fa-so-la-ti-do scale on your harmonica. The "do" sounds are the key that is stamped on your harmonica. If playing with a guitarist, you should play either an E or an A, as these are notes that guitarists like to tune to.
You can get an interesting effect by choosing the wrong key harmonica. All the notes are accessible on any harmonica, but choosing the "wrong" key places these notes in different positions. The best cross harping key is the fourth. Basic blues chords are called the 1-4-5 chords. If the key is E, these chords will be E, A and B. The guitarist can help you find the 4 chord in whatever key you are playing.