It depends on the code that you used when you added it, and where did you add it from. You need to have a google ad sense account and then instead of selecting an ad unit, you select search unit, and follow the instructions and then get the code. There will be 2 sets of code. One set of code for the search box, and you can add that to a text widget in your wordpress. And the other is the code for the search page results. you have to paste it to the search.php page. If you don't have search.php page , you will have to create one.