All of the higher order array methods are well documented in the MDN. Especially of interest are the first two sections of each doc - a brief description of the method followed by a syntax detail. The syntax section clarifies which parameters will be passed to your callback function (and in what order).
That said, here’s what’s happening …
There is a “contract” between the filter method and the function you pass to filter. Filter will pass three parameters to your function for each element of the array - the current element, the index of current element and the entire array. All three get passed whether you use them or not.
In this case you are using only the first parameter - the element - which you are giving a local name of “num” inside your callback function. You can name it anything you want - I usually use “el” for element