Digital marketing works for B2B as well as B2C companies, but best practices differ significantly between the 2.
B2B clients tend to have longer decision-making processes, and thus longer sales funnels. Relationship-building strategies work better for these clients, whereas B2C customers tend to respond better to short-term offers and messages.
B2B transactions are usually based on logic and evidence, which is what skilled B2B digital marketers present. B2C content is more likely to be emotionally-based, focusing on making the customer feel good about a purchase.
B2B decisions tend to need more than 1 person's input. The marketing materials that best drive these decisions tend to be shareable and downloadable. B2C customers, on the other hand, favor one-on-one connections with a brand.
Of course, there are exceptions to every rule. A B2C company with a high-ticket product, such as a car or computer, might offer more informative and serious content. Your strategy always needs to be geared toward your own customer base, whether you're B2B or B2C.