You aim for a goal. If you aim for the stars, that's what you want to achieve: high success.

You aim at a target. If you aim at the stars, you'll unlikely hit them, as they are far away. You arrow will hit the ground.

But you could also aim at doing something

You aim to reach a goal. You need a verb. You aim to succeed but you aim for success. And you aim at succeeding. (Although, the last phrase doesn't have the same thing to it.)