と (to): "and", "with" and quotation
Along with の, と is one of the first particles to learn after the essential five. Three very frequent uses: "and" between nouns, "with" someone, and the spoken quotation mark that closes off a quote or a thought.
Use 1: "and" between nouns
と links nouns, and only nouns: you can't use it to join two sentences or two verbs. And the list is closed: you name everything there is, nothing else.
本とペンを買う。
ほん to ペン o かう。
Buy a book and a pen.
犬と猫がいる。
いぬ to ねこ ga いる。
There's a dog and a cat.
Use 2: "with" someone
Who you do the action with: the person accompanying you is marked by と.
友達と映画を見る。
ともだち to えいが o みる。
Watch a movie with a friend.
母と買い物に行く。
はは to かいもの ni いく。
Go shopping with my mother.
To stress the togetherness, add 一緒に (いっしょに): 友達と一緒に行く (ともだち と いっしょに いく), "go there together with a friend".
Use 3: quotation
と closes off what someone says or thinks, like a spoken quotation mark. What comes before と is the content; the verb after it, 言う (いう, to say) or 思う (おもう, to think), tells what's done with it.
「ありがとう」と言った。
「ありがとう」 to いった。
He said "thank you".
面白いと思う。
おもしろい to おもう。
I think it's interesting.
と vs や: closed list, open list
Complete list → と
本とペンを買った (ほん と ペン を かった): "I bought a book and a pen". Nothing else: the list is complete.
Sample list → や
本やペンを買った (ほん や ペン を かった): "I bought a book, a pen, among other things". The list is open: there was more.
What about conditional と?
You'll also run into と right after a verb: ボタンを押すと、ドアが開く (ボタン を おす と、ドア が あく), "as soon as you press the button, the door opens". That's conditional と (N4 level), meaning "as soon as / whenever". Save it for later: the three uses in this article cover the essentials of beginner Japanese.