According to Maggie Righetti in Knitting in Plain English1, there are a couple of methods you can use to narrow down the possibilities.
The Burn Test
Take a small length of the yarn and hold a flame to one end of it. Take safety precautions when doing this. Don't perform this test near anything else that's flammable and be prepared for the yarn to burn or melt.
Animal Fibers - These will burn slightly but will not sustain a fire once the source of the flame is removed. There will also be a smell.
Plant Fibers - These will sustain a fire once lit.
Man-made - These will melt when exposed to high heat or flame.
The Rub Test
Rub a few strands of the yarn between two fingers 8 - 10 times.
Cashmere and some acrylics - These fibers will start to pill or ball when rubbed together.
The Resistance Test
Hold 3 inches of a single strand of yarn between your hands. Pull the strand firmly, then quickly release the tension.
Good wool, some acrylics - Will "stretch and snap back"
Cotton, linen, and silk - These have poor elasticity and will not snap back.
Getting Mixed Results
If you seem to get results that imply the yarn is multiple things, it probably is. Many yarns are a mixture of different fibers.
Righetti, M. (2007). Chapter 3: Don't Get All Balled Up About Yarn. In Knitting in Plain English. New York City, NY: St. Martin's Press.