This is known as a "filter portlet". Pretty useful functionality actually.
You create the filter portlet - which only contains filter fields.
Then on the page layout (on which you've added you normal portlet(s) ) you also add the filter-portlet and then associate/map the fields from the filter-portlet with the fields in your normal portlet(s). The fields have to be the same datatype / lookup type etc.