How can one practise marketing and sales?

One learns and practices coding by building stuff they are interested in. Similarly, how can one learn marketing and sales?

If the answer is "by selling something", then what do I sell?

Freelance Software Engineer, India + Remote
Fullstack Developer. How can I help you?

e.g. write 2 landing pages and A/B test by sending some of your followers to your pages.

Making pretty things;

You can become pretty successful doing just one of them right.

If you're going to charge $XX,XXX for a product (like for enterprise products or freelancing), you'll want to set up in-person meetings. least that's what I've done as a freelancer, and it has worked well. Basically go in, ask them about their problems, find which ones you can solve, and pitch them a solution (the actual estimate can be via email after the meeting).

If you're going to charge less than that (like an $XX/month SaaS offering), you can practice doing cold email outreach. If you don't have any side projects right now, you could offer freelance services. Every day, find 5 people who can use what you're offering, and email them. This is also a good chance to test out your copywriting skills – practice writing short emails (just a few sentences) and long ones (with pictures and stuff) to see how each converts.

Marketing is a bit higher cost. While there are ways to make it cheaper (search "guerrilla marketing examples"), you'll still need to invest some time and money to do it right. You could practice running ads, read over what other people are doing at sites like @harrydry's, and build up a following on social media platforms.

Or sell companies on social media advertising services, that'll teach you both at the same time. :)