A search engine optimization audit can come in a varying levels of detail and complexity. A simple website audit can be as short as a few pages long, and would address glaring on-page issues such as missing titles, and lack of content. On the other hand other end of the spectrum, a comprehensive website SEO audit will be comprised of dozens of pages (for most larger sites it will be over one hundred pages) and address even the tiniest of website elements which may potentially be detrimental to the ranking-ability of a website.
On-page or on-site search engine optimization refers to SEO techniques which are designed to implement the problems and potential issues that an SEO audit uncovers. This is something which should always be part of all good SEO packages. On-page SEO addresses a variety of fundamental elements (as they relate to SEO) such as page titles, headings, content and content organization, and internal link structure.
As with a website SEO audit, there are basic, as well as comprehensive services when it comes to on-page search engine optimization. At the most basic level, an on-page optimization campaign can be a one-time project which includes recommendations developed through an audit, and the implementation thereof. This type of on-page optimization would generally target the home page and a few other important pages on the website. More comprehensive on-page search engine optimization campaigns will use the findings of a highly detailed website SEO audit, and monitor results to guide ongoing changes to the on-page optimization.
Code optimization is a service you can expect at the highest levels of search engine optimization services, as it involves an overhaul of your website HTML. The optimization of your HTML can impact search engine rankings in two ways. First, it can help alleviate code-clutter, and present your content in an easy-to-understand (for machines, that is, search engine algorithms) format. Second, it can help reduce the load-time of your website pages, so that search engine spiders don't have to wait around while your page loads (because it's too long, or has too many images, etc).