in spanish, what do you put at the end of a name to show affection?

It depends on the region, but in Spain, they usually add "-ito"

So, my spanish name for spanish class is Catalina. To show affection, someone would say, "Catalinaito???"

No, in this case there are two options, the first one is to use the diminutive

"Catalinita" (without one a), but the second one is to use only a part of the name and add "i": "Cati",
the ending "ito"is formale gender/"ita"
for female gender, and "i" for both, but sometimes, in México, we use a known nickname, e.g.
Alfonso = poncho.
Concepción= Concha or Conchita.
Alfredo= Fello.
José María= Chema.
Etc.

In Spanish, to show affection at the end of a name, you can use different diminutive suffixes. The most common ones are "-ito" for masculine names and "-ita" for feminine names. To determine which diminutive suffix to use, you need to consider the gender of the name you are addressing.

To form the diminutive, you typically replace the last vowel of the name with the appropriate suffix. If the name already ends with a vowel, you add the suffix directly. However, there are some variations depending on the specific name and its original ending.

For example, if the name is "Carlos," you can add the suffix "-ito" to create "Carlitos," which means "little Carlos." If the name is "María," you can use the suffix "-ita" to form "Maríaita" or "Mariaita," which would mean "little María."

It's important to note that using the diminutive suffixes in Spanish is a common way to show affection, familiarity, or endearment, but it may vary according to the regional dialects and personal preferences.