A visitor or guest is a person who comes to your fort at random, to stay at a location. Initially, you will receive only about three visitors for each location, who are all curious about the location they are visiting. When they leave, they may bring back word of what your place is like, attracting more visitors. This may benefit your fort, for example by providing social contacts for your dwarves, or enlisting soldiers
Guests will come to relax, and only provide social contacts. They may perform in your inn. After they finish their tasks, diplomats may stay for a while as guests.
Scholars will come to study, which includes reading books and discussing scientific topics with other scholars (including other visitors and your own dwarves), and may write books in your library.
Mercenaries will come to enlist in the military. They will either petition for long-term residency or relax, and when you accept them, they can be added to any squad (note that they cannot be squad leaders) and will follow any order the squad receives. They are attracted by your inn.
Performers, as the name suggests, will come to perform in your inn. They will tell stories, dance, make music, or recite poetry. They do this for fun, and will not ask anything in return.
Monster hunters visit inns to hunt monsters within the caverns. Once they are granted long term residency they will occasionally go down into the caverns on their own to hunt.
Slaves will come to relax.
See also: Petitions