Wikipedia definition for Search Engine Optimization: Optimizing a website (SEO) primarily involves editing its content and HTML coding to both increase its relevance to specific keywords and to remove barriers to the indexing activities of search engines.
Wikipedia definition for Search Engine Marketing: a form of Internet marketing that seeks to promote websites by increasing their visibility in search engine result pages (SERPs). According to the Search Engine Marketing Professional Organization, SEM methods include: search engine optimization (or SEO), paid placement, contextual advertising, and paid inclusion.
While many developers lump Search Engine Marketing in with Search Engine optimization, they are really two separate things – Optimization having to do with that which you do on your web site, and Marketing relating to those things you do off your web site.
An analogy can be made in reference to your house and the neighborhood you live in. Your house is the web site, and Search Engine Optimization is what you do to make sure your house has a good foundation, strong frame, and nice furniture and curtains. Search Engine Marketing is what you do to create the community of people who will visit your house. When you go door to door in your new neighborhood to meet new people and invite them to your house, you are marketing yourself in the hope of having friends and visitors, i.e. a good neighborhood.
So to be clear, Search Engine Optimization is the tactics and tools that you deploy on your web site, and Search Engine Marketing is the tactics that you deploy off your web site.