Are you talking about the Google search bar in Safari? If so, go to View, Customize Toolbar, and add or remove whatever you wish. I do not know how to put a different search engine in the toolbar. However, if having a different search engine in the toolbar is a big deal to you, download Firefox, which does allow you to pick from any search engine.
Unfortunately, Apple has chosen to make the URL address field and the Google search a unitary tool... you can't delete one without deleting the other... and least not easily.
There is a method to remove the Google tool... but it causes problems with the Signed Application signatures for Safari in OS X.5 Leopard, because it screws up the signature, indicating that the application has been hacked and prevents Safari from running properly... and apparently locks it from accessing your Keychain for security.