After you start at a new place:
Every 4 months have a one-on-one meeting with your supervisor. Talk about your progress within the company/agency/group, and voice your support for participation in projects or programs that would be beneficial to your career, or promotions. Let your supervisor know you are interested in challenges.
If you get to a point where your career trajectory at a company/group/whatever is stagnating - THEN you should start looking for another position.
If you're at the same company for a while but you're progressing, there can be advantages - hikes, more money in stock options, higher responsibilities, you get to REALLY know your clients.
If you're in a company and you let them know you're up for challenges or promotions and nothing happens - and you're demonstrating you can handle the harder work - that's a sign to move on.
You are worth more the more you learn. Otherwise, you are getting paid less the more you know.