was driving and came to a stop sign car shut off right before all the lights on 2001 Nissan Altima

it restarted and drove a lil longer for a few lights each time at light it shut off but then it shut off and wouldnt start at all tried to jump start it wont when i turn key it sounds like it wants to start but dont turn over

Asked by for the 2001 Nissan Altima