In this answer I am going to assume you have a iPhone, smartphone or other gigantic looking phone that would fit into this mechanism. Actually many phones may fit into it, but the designs I saw are mostly for larger phones.
Picture taken from primermagazine.com.
- Use a Mini DV case. If you turn the case the wrong way then the phone can sit either sideways or straight up without falling out. These can be decorated or you can make them into a dock for the phone.
Picture taken from instructables.com.
- Use Binder clips. You will need a larger clip and smaller clip, by taking the smaller clip and bending it upwards as much as the larger plastic or metal portion will go without breaking it and then inserting the smaller clips long metal arm like extensions in the mouth of the larger clip up to its metal or plastic body.
Additional Info
When in doubt use a paper clip. This method seems sort of fragile so I declined to add it in a conventional answer.
Use Legos. While this link shows only a simple design, you can do wonders with Legos.
And like the other answer suggests use a card. Or business card, perhaps?
For additional ideas see the following links:
makeuseof.com
geeknaut.com
lifehacker.com- This one uses iPhone packaging, Binder Clips and tape to make a awesome case.