2001 BMW 325I

I bought a 325I recently and the day I bought it it dies in the driveway. I called the place I bought it from and they said I just needed to jump it and let it run for a while and I did. It finally started up properly but after a couple of weeks meaning today I started it up in the morning to some heavy putting while wawrming up. I went to the store and when I came back out it wouldnt start. I tried having it jumped with another car but the ac and lights were the only thing to turn on with it clicking trying to start. What could it be?