For both red and green chilies, you typically trim the stem. Some people also remove the seeds if they want to reduce the heat.
The primary part you trim on both red and green chilies is the stem. This is where the chili was attached to the plant. Simply cut or break off the stem close to the body of the chili.
Beyond the stem, the only other part you might consider 'trimming' is the seeds and the inner membrane (placenta) where the seeds are attached. This is where most of the capsaicin (the compound that makes chilies hot) is concentrated. Removing the seeds and membrane will significantly reduce the chili's heat. This process is the same for both red and green chilies. To remove the seeds, slice the chili lengthwise, then scrape out the seeds and membrane with a spoon or knife.
There's no real difference in what you trim between red and green chilies. The color difference simply indicates the ripeness of the chili. Green chilies are unripe, while red chilies are ripe.
When handling chilies, especially when removing seeds, wear gloves or wash your hands thoroughly afterward. Avoid touching your eyes or face, as the capsaicin can cause a burning sensation.