The filter box in the (Product) Backlog view only works on keywords, unfortunately, and you can't exclude items. There is also a Tags filter. If you click the filter button, you can click the tags you want to include. This would require you to add a "backlog" tag to all the items you want to show (excluding tasks, of course) but, even though it works, it's not a great solution, because you have to manually add the tag to the work items you want to display.
If you're not tied to the Backlog view, you could switch over to the (Kanban) Board view. There is a more advanced filter there. Click "Board" at the top, then the filter button in the upper right, and then you can filter according to work item type and other values. This is probably what I would do.
The third option is to convert your view into a query by clicking Create Query at the top of the backlog (or just manually writing a new query). You can then edit the query to exclude Tasks. The advantage is that it's a lot easier to control what work items you see (or don't see), and how you see them. The disadvantage is that you lose the ability to drag-drop for stack ranking, and other backlog features.