What is a use of jQuery filter?

What is a use of jQuery filter?

This method in jQuery returns elements that match such criteria. For example - $(“p”).filter("#h1") - It will return all “p” tags with the id, named “h1”.