A stylus is an input device that looks and acts like a pen. Instead of drawing with ink, it sends a digital signal to a compatible touchscreen, which interprets the pressure as drawing on the screen.
A basic stylus is a thin plastic rod tapered on the end like a pen. Early PDAs such as the Apple Newton and Palm Pilot came with this type of stylus. Many digital signature pads used for credit card purchases also use a plastic stylus. Simply the pressure of the plastic tip is used to draw a digital image on the screen.
Modern smartphones and tablets have advanced touchscreens that are designed to be controlled by human touch. In order to prevent unintentional input, they ignore contact from other sources — like a stylus. Therefore, modern touchscreen devices, like the Samsung Galaxy Note and the Apple iPad Pro have custom styluses that include built-in sensors and transmitters. The Apple Pencil, for example, connects to the iPad via Bluetooth. The iPad Pro combines information from both the stylus and the touchscreen to accurately record the motion of drawing on the screen.
NOTE: Any stylus that contains sensors or connects wirelessly to a device is battery-powered. Therefore, a modern stylus may need to be charged in order to work correctly.