Scroll down on this link to the bit that says "Search Form";
http://twitter.github.io/bootstrap/base-css.html#forms
Here's a fiddle showing it working: http://jsfiddle.net/3PgU2/
<form class="form-search">
<div class="input-append">
<input type="text" class="span2 search-query">
<button type="submit" class="btn">Search</button>
</div>
<div class="input-prepend">
<button type="submit" class="btn">Search</button>
<input type="text" class="span2 search-query">
</div>
</form>