The goal of the game is to produce as many cookies (by clicking on the Big Cookie and buying buildings to produce them) as you can. There is no end to the game, but some believe getting all the achievements is technically seen as "finishing the game".