Depends on philosophical school. To the Stoics, for instance, the world was subject to periodic conflagrations where, essentially, Jupiter would send forth divine flames to burn everything and then re-set existence, but nothing could ever be truly created or destroyed, so while there was a finite amount of time alloted to this earth, the world was eternal in all directions (had always been and will always be). Other schools had other answers.