There are a few kinds of promotions and raises and they come for different reasons then one may actually think. You need to decide what they are based on career goals and work with management to make it happen when possible. Here are the kinds of promotions I would say exist most commonly:
Promoted Up - You are promoted to a higher position with usually decently higher pay. These types of promotions are because you show the ability to perform at a very high level doing a job that is not your own. If you want this kind of promotion then get with the person who's job you want and help them to perform day to day operations. Noone is going to "promote up" for being good at your job, its about being good at the job your going to get.
Promoted sideways - This encompasses two kinds of changes, title and supervisor. Many times you will be asked to take on additional responsibilities that are related to your existing job but don't greatly change what you do day to day. These jobs are normally stepping stones and you are not taking them to be payed much better (Although they do usually come with some kind of raise) but rather to add them to your resume or be in a better position to be promoted up later. You get these by being very good at your job as well as excellent at interpersonal skills and leadership. You take these simply because being a "Senior Systems Analyst" looks better on paper then "Jr. Systems Analyst", not for the lackluster pay increase.
Promoted slightly in each direction - Many times you will be in a grey area between the other two types. This would be the case of going from a Systems Analyst to a Jr. Systems Administrator. You normally will get a decent pay bump for having an additional worth such as training or certification or an obvious understanding of the subject. You get these by pushing yourself to be better in something your company needs more of.
Companies don't promote to promote. Why would they promote you to something your not ready for? No matter how good you are at your current job a promotion won't benefit them a lick, you need to be great at your future job, know it inside out. Ask the person who has the job what they do, how they do it, and how you can do it too. Ask if you can shadow them, if your work's done your manager will probably be thrilled. Just make sure not to make them feel threatened like your trying to take their job. Tell them you think they are great at it and just want to learn.
As for raises. Its all about employee retention not anything else. Companies give you raises to compete, not for any other reason. Keeping you happy keeps you there and prevents them having to move on. You could be incredible at your job but after you reach a level of worth to the company its the same if you leave or not. You need to increase the value of your job, not your value itself. I could be the best box packer in the world, but I'm still a box packer.