I need to add star rating to my site for showing the star image rating in search results. I did a search on the internet and read a few articles on it. It is basically Microformats and the related tags. I'm still confused about the review. What if I need to use the tripadvisor review and rating on the search results. How can I do that or can anybody tell me about the code that I need to put in to my pages. I'm sorry for not being sound to this question.
Use the schema.org markup. You'll need to have a way to collect reviews with star-ratings from your users, and then display them on the appropriate pages with the correct markup. Also, the reviews should be unique to each page.
Once you've done this, run a few of them through the Google Rich Snippets tool. If they appear okay there, then just sit back and wait. It can often take a long time before the star ratings show up in SERPs, if they show up at all (I believe this is largely affected by the authority of your domain).