Your combat is determined by your Attack, Strength, Defense, Hits,
and top 2 of your Prayer/Magic/Ranged
. Every 4 attack, strength, defense, and hits levels is one combat level. Every 8 of your prayer, magic, or ranged levels is a combat level UNLESS
you level up on the lowest of those 3 stats. If your magic and prayer and both higher than ranged, and you level up on ranged 8 times and it is still lower than prayer and magic, it doesn't effect your combat. Same with other two skills. Another way to look at it is that each attack, strength, defense, and hits level gives .25 to your combat level and each prayer, magic or ranged (as mentioned above) adds .125 points. after each 1.00 point you level up one combat level.
When you start in Lumbridge, you are combat level 3. When you hover your mouse over another player, a line of words come up at the top stating the players name and level. The words are in colors based on the contrast between your combat levels. If your combats are the same it will be white. If yours is a little greater, it will show up as light green. If your combat is much greater, it will show up as a darker green. If your combat is just below theirs, it will be a orangish color. If your combat is much less, it will show up as dark red. Level 123 is the highest level you can be, and I am not sure if there is a level 123 player. (Email me anyone?)