As a matter of fact, the 1948 war actually started on November 30th, 1947 - the day after the UN Partition Resolution, as the Arabs vowed not to accept it. The first phase of the war pitted Palestine Arab irregular warbands against Jewish paramilitary formations - the mainstream Haganah, the more nationalist Irgun, and the really really radical Lehi. The Arabs were largely beaten in this phase. During the second phase, the armies of five regular Arab states invaded the newly formed State of Israel and by and large met with defeat. (The only one of them to acquit itself well was the Transjordanian Arab Legion, a British-trained and partially British-officered unit).
The main brunt of the first phase of the fighting was borne by the Haganah. Where did it come from? Well, for the duration of the British Mandate in Palestine, the Jews were building, with British sanction, the institutions of a proto-state, usually called in later historiography "medina shebaderech", literally meaning Hebrew for "a state on its way". This included democratic elections of quasi-executive and quasi-legislative councils, trade unions, healthcare institutions etc. (Wikipedia is very brief on this - but still worth a look). It was also building a paramilitary capacity, known as the Haganah - unlike the rest of the institutions, this was mostly against British wishes. (Haganah-British relations are a somewhat complicated subject, which I haven't time to treat here fully). Haganah was also practicing a form of "voluntary conscription" - young men were expected by their society to join its training for a year; those who declined to do so were socially frowned upon.
So, when the newborn Israel needed an army, it had the nucleus of one - Haganah. This is the story in brief.
One source which treats this from an interesting angle is a chapter in the book Supreme Command by E.Cohen.