I've always understood it as telling someone to overachieve (but not in a negative way) or to do your best. Basically it means don't limit yourself to doing poorly.
Student: I will be lucky to get a C on my exam
Friend: Shoot for the stars and study hard
That is a bad example, sorry.