I've had to explain this so many times over the years I have it pretty down pat. I will start by saying what several of you have already noticed, that history and political science have a lot of terms that are very close to each other, but mean very different things, so brace yourselves because it can seem pretty nitpicky, but they're important distinctions. Also forgive me if I state the obvious or overexplain, but in my experience it's better to cover too much.
Let's start with capitalism and socialism, which are economic systems. The difference between them is who owns the industry (that is, the means of production of goods of services). In capitalism, industries are privately owned; Bob's Restaurant is owned by Bob, who decides what to sell and sets the prices, and the people who eat are the people who can afford it. In socialism, industries are publicly owned; The Popular Restaurant is owned by the people, and the government decides what to sell and sets the prices, and the food is (at least theoretically) given to whoever shows a need for it. There is nothing inherently good or bad, or right or wrong, about either of these: they are simply systems, and can each be used or misused.
These two terms can be applied to an entire nation, but they can also be applied to specific industries. For example, the United States has a capitalist system, meaning it leans towards its industries being privately owned. However, it does have industries that are run by socialist ideals, such as fire fighting; the people each pay taxes to the government, who allocates a part of it to the fire fighting industry, and their service (fire protection) is provided to the person who needs it (whose house is on fire). Fire fighting used to be run on capitalist principles back in the day, but the US purposefully reformed it to be an industry owned by the people, with the government operating it for the benefit of all, which is the definition of socialism, even though the US has a capitalistic system.
However, the US is still capitalistic. A good way to tell is by looking at a bellwether industry such as health care. In the US, it is mostly privately owned and run, but in nations such as Denmark, it is part of the government. That points pretty clearly as to which nation prefers which system.
So that's the economy, but how do they fit in with the types of government? The US and Denmark are both democracies, because in both nations the power to make change lies with their people. Denmark is a democracy that prefers socialism, so we call their system 'democratic socialism'; their health care (etc.) is controlled by their government, and the Danish people choose the government, so the system works for them. The US is a democracy that prefers capitalism, so most American industries are privately controlled, based on the tenets of the open market, and so on. Democrat socialists in America such as AOC and Bernie Sanders want to move the nation toward being mostly-socialist, which you can see in the fact that one of their highest priorities is single-payer health care, with the single payer being, you guessed it, the government.
But democratic socialism isn't the only way to use socialism. Back in the 1830s, Marx and Engels came up with a way to sell it in a system of autocracy, which is when the power to make change lies in the hands of a single dictator. They called this system Communism because its utopian idea was that the whole world would eventually be one big commune with no need for leaders, government, or even money, and making the economy run by socialism is one stage on the way toward that goal. The fatal flaw, of course, and the reason that Communism will never work as designed, is that in practice it requires a dictator to impose its system on society, and dictators are not known for giving up power once they have it (a fact which only took the world about a century to figure out).
Communism is therefore an autocratic government that uses socialism for its economy. A democratic government that uses socialism for its economy is called democratic socialism. They both use the same tool, a tool which is opposite of the American favorite, but they are fundamentally different in their structure.
This is the skeleton of the system, but there are a ton of other aspects that can get very confusing and smokescreen-y. There are definitions behind the terms 'left-wing' and 'right-wing,' 'liberal' and 'conservative,' 'progressive,' 'classical liberalism,' and many more, and of course specific parties whose makeups regularly shuffle. There is fascism, which is an autocratic system that uses aspects of both socialism and capitalism but opposes them both, and also Fascism (capital 'F'), which is a specific party. There are the Nazis (German-flavored fascism), who decided to market themselves as 'National Socialists' even though they do not follow socialism at all, and Neo-Nazis, and Anti-fascists, and lots of modern countries that may or may not be any of those. There is also 'social democracy,' which is a completely different subject than 'democratic socialism,' and there is corporate regulation and civil services, which a lot of people paint as socialism, but which really isn't.
It can all get very murky, but I hope I've described the basics of socialism, capitalism, democratic socialism, and Communism, at least.