A logo is a picture. A slogan is a phrase or sentence.
"Logo" is short for "logotype." A logo identifies a brand. It's always the same, or at least stays the same for years and years. It means the brand but it is easier to recognize at a glance than a printed name would be.
A "slogan" originally meant the war cry of a Scottish clan. A slogan is something like a motto, but a slogan is usually vigorous--you can imagine yelling it or saying it loudly. A slogan is intended to make you emotional and enthusiastic about something. Slogans are often connected with a publicity campaign and change fairly frequently. A slogan does not identify a company, but it tells you something the company wants you to believe or feel about the company.
For example, GE's logo is the script letters GE inside a circle with four white swirly things that make me think vaguely of a motor or generator spinning. GE's slogan is "imagination at work." Before that it was "we bring good things to life."
Yes, on something like a tee-shirt or a website, a logo would often appear next to a slogan.
If you have or are starting your own company, you certainly can design your own logo and write your own slogan, but it's not a good idea. Designing a good logo is a skilled job for a talented graphic artist. Creating a good slogan is a job for someone who is very good with words.