1..within the website
2..outside the website(internet)
the search within the website is called as the custom search(google providing some features to embed into particular website)
In this application i ll explain the procedure to use google custom search in a particular website.....
step 1:
http://www.google.com/coop/cse/
and login with your credentials of gmail....
step2:
go through the steps which the google does and fill in details step by step and the figure looks something similar to this....
once you done with the general information it will lead to figure below....
which will have all the custom search engines which you created....

just go through the control panel of the search engine u need to develop and fill in the details of it....the basic section of your search engine would be something similar to this....

try to keep as many keywords for the search engines as possible so that it would be easy to find the contents of your website using those keywords....change the options as per the requirement...i hope you ll do every thing i am just trying to help only by using suitable figures....here comes the next figure...

next comes indexing section this is the main important thing of the process..here you need to add the urls of your website in which you need to search..basically when the ultimate search engine comes then it checks your request only in these urls...hence one must be very careful in giving these urls....
once the urls been placed then check these urls in sites section of the homepage....here you ll be shown some urls where in it vl give the urls of the sites you entered in the previous section....

when you complete this section you ll have to copy the code which will be under code section...this code must be copied to all the pages where you want to insert the search box of custom search....the preview of it would be like this.....

this completes everything of the procedure of the custom search...now its left to google to implement it and you just need to wait for few hrs to get your custom search to be implemented in the website.....
once the google implements it then it would be clearly visible in the indexes section....where how many urls hav been indexed would be visible if the google implements everything then the number of links u placed would be indexed and it would be fully indexed..by default it is partially indexed....

once completed done...you can preview it in the preview section....and enjoy the feature to be implemented in your website.....

here by default it gives free custom search...for free custom search google provides some adds to be placed on top of the links....hence if you need them not to be placed in this section then purchase with respective amount....and enjoy the custom search to the fullest......
thanx
regards
kiran.joshi