
This technology has actually been patented already by Samsung, the patent reveals that this technology uses magnets to achieve the desired result. There's a magnet inside the S Pen and one magnet inside the device, the magnets will snap firmly when the stylus is inside the device. Making it throw out the S Pen on its own would be simple enough, just reverse the polarization on those magnets and make the device pop up the S Pen on its own.
This leaves the question of how polarization is going to work, Samsung may tie the auto-eject feature of the S Pen to a certain voice command or perhaps there will be a button or a gesture drawn on the display that's going to bring out the stylus. Samsung has obviously not confirmed anything regarding the features we can expect from the Galaxy Note 5, we'll only know for sure once Samsung formally unveils this smartphone later this year in September.