The one in the sub-forum is intended to search through that sub-forum only (and not through the rest of the site). The one using the magnifying glass icon can be used to search through the whole site.
We changed the layout of the tabs as per our update announcement:
Because of the addition of post views, we changed the division of the tabs for topics (contains all views related to topics), posts (contains all views related to posts) and relocated other functionality (like forum settings, mentions, favorites and search) as individual tabs with recognizable icons.