Follow this steps:
1. Login at Google Custom Search.
3. Click the 'Look and Feel' link in sidebar.
4. Click the link in "New! Use the new Custom Search Element to embed results in your webpage, providing a dynamic and inline experience to your users." at the top.
5. Copy and paste this snippet of code given into Edit Html tab of post editor or in a HTML gadget in sidebar.