One of the lamest things about working is the inequality of it all. Somebody can have the exact same job as you, work as hard as you, and have comparable experience to you and still get paid more for some reason. It might be because they were hired a few months later or because they made a better first impression in the job interview. No matter what the reason, it's a sucky part of working.
There are a few things you can do when you find out your coworker makes more money than you. You can talk to your boss about raising your salary. You could ask them why the other employee is getting paid more, and ask what you can do to get the same salary. You also can sabotage your fellow worker, lie to the boss about them making an inappropriate comment towards you, and get them fired. Of all the options, the latter is probably the least likely to get you that raise.