The Galaxy Note 5's S Pen had a minor issue. It could be inserted back into the device the wrong way which would cause it to get stuck. Samsung quietly fixed it in its next production run of the Galaxy Note 5 and has designed the Galaxy Note 7's S Pen compartment in such a way that it's impossible to insert the stylus the wrong way in. However, it appears that people are still facing issues even when inserting the S Pen as it's meant to be.
Apparently, when the S Pen is pushed too hard inside its compartment it will get stuck in the “water-tight silo.” Inserting it with a lot of pressure may cause the stylus to get stuck in the silo at a level lower than the metal side surface of the Galaxy Note 7. If this happens to you, don't try to jam it in even further as that will only exacerbate the problem. Use a needle or a pin to carefully pry up the S Pen where it should spring back normally. If you are not able to retrieve it you might want to get your unit replaced but chances are you may have a lot of convincing to do.