It is true that Social Media helps in the two. Although, the latter depends on the former. To use SM to market your website, you've to learn using it effectively. For example, instead of shoving the contents of your website at the faces of the audience you want to build. You give them what they really want, this way you'd be able to get many's attention. Afterwards, you can now market your website to them.
After, you've done the first. Then SM helping your SEO would come in time. You know when you were sharing content on SM and probably using the help of few persons as well before. The buzz being created through SM was minute and has little effect on SM 'cause it was more or less one-sided. However, now that you've probably effectively convert some SM people to your site. They are the ones that would create buzz from different locations on SM, which would show how your website has influence on SM. Thereby, aiding your SEO.
These are just my thought.