I thought everyone, no matter what religion or whatever, could take communion?
Not in Catholic churches, as Arglefumph describes. Meanwhile, in my experience as a Methodist, the pastors make a point to say before Communion that anyone, whether they are or aren't members of the church or even the denomination, can participate. Protestants don't believe in the literal transformation of bread and wine into body and blood. We use just regular bread and grape juice (not wafers and wine), because the symbolism is what counts. So that is the (quite fundamental) difference.
As a non-Catholic, I don't understand how confession influences Communion. We don't practice confession. I'm not trying to be snarky, I really just don't know?
That's pretty much accurate. Catholics believe the bread and wine becomes the body and blood, soul and divinity, of Jesus Christ. Because they take the Eucharist so seriously, they don't allow non-Catholics to receive it. Non-Catholics are encouraged to come up and receive a special blessing from the priest during communion time, though, so it's not like they're being totally excluded.
As for confession and communion, the rule is "if you commit a mortal sin, you must go to confession before your next communion". The rule does not apply to non-mortal (or "venial") sins. The idea is that, if you commit a mortal sin, your first priority should be going to confession and getting forgiven. Go directly to confession. Do not pass go, do not collect $200, do not go to mass and receive communion first.
For whatever reason, most Catholic churches stopped offering the sacrament of confessions during mass. I remember going to the Cathedral in Saint Paul, Minnesota. Their confessionals were so out of use that they converted them into janitor booths. Sad.
It should be noted that the Catholic Church is currently having a big debate over its "people in mortal sin are excluded from communion" rule and how it should be applied. Expect to see it be brought up, during the big Catholic Synod in October.