Writing utensil or small tool for marking or shaping
A stylus (pl.: styli or styluses) is a writing utensil or a small tool for some other form of marking or shaping, for example, in pottery. It can also be a computer accessory that is used to assist in navigating or providing more precision when using touchscreens. It usually refers to a narrow elongated staff, similar to a modern ballpoint pen. Many styluses are heavily curved to be held more easily. Another widely used writing tool is the stylus used by blind users in conjunction with the slate for punching out the dots in Braille.
Etymology.
The English word "stylus" has two plurals: "styli" and "styluses". The original Latin word was spelled ; the spelling "stylus" arose from an erroneous connection with Greek (), 'pillar'.
The Latin word had several meanings, including "a long, sharply pointed piece of metal; the stem of a plant; a pointed instrument for incising letters; the stylus (as used in literary composition), 'pen'". The last meaning is the origin of "style" in the literary sense. The Latin word is probably derived from the Indo-European root 'to prick', also found in the words 'a goad, stimulus' and 'to incite, instigate'.
Ancient styli.
Styli were first used by the ancient Mesopotamians in order to write in cuneiform. They were mostly made of reeds and had a slightly curved trapezoidal section. Egyptians (Middle Kingdom) and the Minoans of Crete (Linear A and Cretan Hieroglyphic) made styli in various materials: reeds that grew on the sides of the Tigris and Euphrates rivers and in marshes and down to Egypt where the Egyptians used styli from sliced reeds with sharp points; bone and metal styli were also used. Cuneiform was entirely based on the "wedge-shaped" mark that the end of a cut reed made when pushed into a clay tablet; from Latin 'wedge'. The linear writings of Crete in the first half of the second millennium BC which were made on clay tablets that were left to dry in the sun until they became "leather" hard before being incised by the stylus. The linear nature of the writing was also dictated by the use of the stylus.
In Western Europe styli were widely used until the late Middle Ages. For learning purposes the stylus was gradually replaced by a writing slate. From the mid-14th century improved water-powered paper mills produced large and cheap quantities of paper and the wax tablet and stylus disappeared completely from daily life.
Use in arts.
Styluses are still used in various arts and crafts. Example situations: rubbing off dry transfer letters, tracing designs onto a new surface with carbon paper, and hand embossing. Styluses are also used to engrave into materials like metal or clay.
Styluses are used to make dots as found in folk art and Mexican pottery artifacts. Oaxaca dot art is created using styluses.
Smartphones and computing.
Modern day devices, such as phones, can often be used with a stylus to accurately navigate through menus, send messages etc. 
Today, the term "stylus" often refers to an input tool usually used with touchscreen-enabled devices, such as Tablet PCs, to accurately navigate interface elements, send messages, etc. This also prevents smearing the screen with oils from one's fingers. Styluses may also be used for handwriting, or for drawing using graphics tablets.
Many new phones have a built-in stylus which tucks in behind the back cover. Some styluses may extend and contract into small, pen-like cylinders, which are easy to put away.
Styluses come in both passive and active versions.
A passive or capacitive stylus is a stylus that acts just like a finger when touching a device screen. There is no electronic communication between a passive stylus and a device, and the device treats the stylus the same as a finger. Passive styluses are considered less accurate than active styluses.
An active stylus includes electronic components that communicate with a device's touchscreen controller, or digitizer. Active pens are typically used for note taking, on-screen drawing/painting, and electronic document annotation. They help prevent the problem of one's fingers or hands accidentally contacting the screen.
As in ancient styluses, the stylus is pointed or rounded at one end and is made to fit in the grip of a hand comfortably. These styluses can be found in many different styles.
Since many modern tablets make use of multi-touch recognition, some stylus and app manufactures have created palm rejection technologies into their products. This works to turn off the multi-touch feature allowing the palm to rest on the tablet while still recognizing the stylus.
Other than the types above, a haptic stylus is a stylus that simulates, through haptic technology, realistic physical sensations which can be felt while writing on paper. The sensation is sometimes enhanced by the combination of auditory and tactile illusions, such as with RealPen.
Scientific instruments.
A stylus is also an instrument used to scribe a recording into smoked foil or glass. In various scientific instruments this method may be employed instead of a pen for recording as it has the advantage of being able to operate over a wide temperature range, does not clog or dry prematurely, and has nearly negligible friction in comparison to other methods. These characteristics were useful in certain types of early seismographs and in recording barographs that were once used to verify sailplane records. The styluses used in scanning tunneling microscopes have only a single atom at the tip; these are effectively the sharpest styluses possible.