JSF pages (.xhtml) are uses mostly JSF tags that can be bound via various attributes to you JAVA code (managed beans), eventually all those JSF tags are being translated to simple HTML tags (just do a view source and inspect the final result.
Now to the js/jQuery , after the page is loaded (page on load / jQuery ready) you can manipulate the html page (UI) with the js code that can be executed on page load / ready etc... or as a result of clicking on some element in your page.
Among others you can trigger JSF with js / jQuery by doing stuff like $('#someId').click();
where someId
is an id of some JSF element
<h:commandButton id="someId"
action="#{myBean.myAction}">
<f:ajax execute="@form" render="@form"></f:ajax>
</h:commandButton>
Remember eventually all JSF elements / PrimeFaces elements are translated into simple HTML elements (in Primefaces a relevant js code is being included into your page for their UI elements to work)
That's it...
JSF does have hooks for calling js code, its mostly done along with calling ajax, for example you can display a loading div before ajax begin and hide it after ajax end (google about jsf ajax begin
complete
success
)
Calling JSF actions from js - for example if you have some jquery plugin which contains some data and that you want to submit to you managed bean - in this case you can place all that plugin data (some JSON) into hidden text input and than fire a jsf ajax call that execute that json to your server),