Okay, so you know how when you play with your toys, each toy does different things? Like your toy car goes "vroom vroom" when you push it, but your teddy bear doesn't do anything when you hug it.
In the same way, when computer programmers write code (instructions) for their computer programs, they can create different "traits" for different parts of the program.
A "trait" is like a special superpower that the code has. It lets the code do specific things, like print out a message, or calculate a number, or show a picture on the screen.
Just like how your toy car has the "trait" of making a vrooming noise, and your teddy bear has the "trait" of being soft and cuddly, different parts of a computer program can have different "traits" that help them do what they're supposed to do.
So, in short, a "trait" is a special ability or feature that is programmed into specific parts of a computer program.