There are many ways to gain XP, I will try to explain some of the most popular
D-class XP -> Exchange scrap (press E on the NPC in showers) gathered from trash found in dblock (containers, bins, piles of trash on the floor) or participate in experiments to get credited
Combat XP is gained by killing other players (don't RDM, though) as a non-SCP job or by gaining credits as an MTF or GSD role (cadet, officer, etc.).
Research XP -> Gained by crediting D-class during experiments, having your documents approved on the SCiPnet (the better the grade, the more XP you gain), and submitting a sample syringe to the dispenser.
SCP XP -> Gained by killing players as an SCP job or by being a subject to sampling.
Support XP -> Gained by healing...