Hi Vijay,
Pagination is the mechanism of restricting the number of records you fetch from backend during every call. Like every other web application it works on request-response architecture. The UI via OData query parameters $top and $skip mention the number of records to be fetched (acts as a request) and it has to be correspondingly supported by backend (with proper response) by handling it in backend whose code i have mentioned above.
In nutshell it has to be implemented in the backend.
BR,