You say io piaccio la pizza, because that is the sentence English hands you: I like the pizza, subject then verb then object, in that order. The Italian words are all real and the sentence is not. Io piaccio means “I am pleasing”, so what you have said is closer to “I am pleasing the pizza”, and the person listening will work out what you meant and will probably not stop to explain why it landed oddly.
The verb is piacere, and it means “to be pleasing to”. That single fact rearranges the sentence. The thing you like is the subject, the thing doing the pleasing, and the verb agrees with it. You are not the subject at all. You are the person it is pleasing to, which in Italian is an indirect object: mi, ti, gli, le, ci, vi, gli, or a name with a in front of it.
So the ending of the verb has nothing to do with you. One thing pleases you: piace. Several things please you: piacciono. This is why mi piace gli spaghetti is the second mistake learners make, once the mi is in the right place. The mi is correct there. The verb is still looking at the wrong word. Gli spaghetti is plural, so the verb has to be piacciono, whoever is doing the liking.
Mi piace la pizza.
Mi piacciono gli spaghetti.
Mi piace cucinare.
A Marco piace il calcio.
Mi piaci.
Mi piaci is worth sitting with, because it is the sentence where the reversal is impossible to ignore. There is no noun in it to hide behind. The person being addressed is the subject, the speaker is the object, and the verb belongs to the other person. Say it out loud a few times and the whole pattern stops being an exception to English and starts being a shape of its own.
The pronouns are the ordinary indirect ones, and they behave here exactly as they do everywhere else. Mi piace is it pleases me, ti piace it pleases you, gli piace it pleases him, le piace it pleases her, ci piace it pleases us, vi piace it pleases you plural, gli piace it pleases them. Only one form does double duty, gli, which covers him and them, and in speech the context carries it. In careful writing, “it pleases them” is a loro piace.
The edge that trips people up
The past tense is where this verb catches people a second time, because piacere takes essere. That means the participle agrees with the subject, with the thing that did the pleasing, and not with the person who liked it. Mi è piaciuto il film. Mi è piaciuta la casa. Mi sono piaciuti i libri. Mi sono piaciute le scarpe. Four endings, chosen by the same word that chose piace or piacciono in the present.
Mi sono piaciute le scarpe, ma non mi è piaciuto il prezzo.
A man and a woman say this sentence identically, which is the clearest proof that the agreement is not about them. Mi sono piaciute le scarpe is what both say, because le scarpe is what the participle is agreeing with.
Then there is a me piace next to mi piace. Both are correct, both are ordinary, and they mean the same thing. The difference is weight: a me is the stressed form, so it is what you use for contrast or emphasis. A me piace il caffè, a lui piace il tè. Placed there, it does the work English does with the voice: I like coffee, he likes tea. Used for no reason, it sounds like you are making a point. The same holds for a lui against gli, and a lei against le, which is one small advantage of the long forms: a lui and a lei are unambiguous where gli and le can be misheard.
One more case belongs here, because it is the one that sounds wrong to English ears even after the rule is clear. When the thing that pleases you is a person or people, the verb goes to them. Mi piacciono i tuoi amici, I like your friends. Ti piaccio?, do you like me. The verb sits with whoever is being liked, however strange it feels to say piaccio about yourself.
And the same machinery runs several other Italian verbs, which is the payoff for learning it once. Mi manca Roma, I miss Rome. Rome is the subject, and mi mancano i miei amici is the plural of it. Mi serve una penna, I need a pen. Mi sembra strano, it seems strange to me. Mi fa male la testa, my head hurts. Each one puts the thing first and you second.
How to hear it
The thing doing the pleasing is the thing the verb agrees with, and you can find it without knowing any grammar: it is the thing you like. One thing, piace. More than one, piacciono.
If that is hard to do mid-sentence, translate yourself into stilted English before you speak. Say “the pizza pleases me”, “the spaghetti please me”, “cooking pleases me”. Any sentence that survives that rewrite is already in Italian word order, and the verb ending comes out right because you have put the subject where Italian keeps it. Any sentence that does not survive it, like “I please the pizza”, is the one you were about to say.
Which leaves one sentence to read again. Mi piaci is not “I like you” with the words in a strange order. It is “you are pleasing to me”, and the verb in it belongs to the other person.