The Content Query Web Part is a great feature of SharePoint that allows you to aggregate content from different lists and libraries in your site or site collection. It also allows you to filter, sort and group the query results based on common fields. They can also be filtered by using metadata. In order to set up the filters for use with metadata, you first have to set up the metadata term set you will be filtering by as a site column.
To do this, go to Site Actions > Site Settings and under Galleries, click on “Site Columns”. On the Site Columns page, click “Create” to create a new site column. Give the site column a new name and select Managed Metadata as the column type. Also assign the column to a site column group.
Further down on the page, in the Term Set Setting section, navigate to your term set and select it. Click OK to create the Site Column.
Add the site column to all document libraries or lists that you wish to include in your query. Do this by going to your library or list’s setting page and clicking on the “Add from existing site columns” link. You will also need to assign column values to all existing items in those lists and libraries if you want them to show up in the query.
You should now be able to use the newly created site column as a filter in a Content Query Web Part. Edit the web part and under Additional Filters, select the newly added metadata site column from the filter drop down list.