Basically they could be trying to establish how ambitious you are, how long you intend to stay with the company, your future intentions, life plan.....
It is an opportunity for you to explain your goals career-wise - this should be in-line with the job which you have applied for/being interviewed for. The interviewer likely wants to know how the company will benefit from you achieving your goals than what you'll get from it, but they go together really. It's not a good idea to tell your potential new boss that you'll be going after his or her job, but it's okay to mention that you'd like to earn a senior or management position. Mention that you'd eventually like to work your way up, having gained experience and knowledge along the way, utilising you skills etc - if you havent already mentioned those things.......good luck