The first way that social media can (indirectly) help your search engine ranking is through content promotion. We might write, film, or record tons of great quality, keyword-optimized content but still not get many eyes and ears consuming it. Social media allows you to take the quality content you have worked hard to produce and promote it on several channels.
Remember when you used to rely solely on search engines for traffic? Remember when you worked on SEO and lived and died by your placement in Google? Were you #1? Assured success. Well, okay, maybe not assured. Success only came if the keywords were relevant to your site users, but it was the only real roadmap to generating site traffic and revenue.