What do you mean by on-page and off-page optimization?

On-page optimization: on-page optimization is used to deal directly with the content and the structure of the website.

Off-page optimization: Off-page optimization is a technique which is used to boost your search ranking by getting external links pointing back to it.