The question applies to all stages of the war, from the civil war phase from November 1947 to the founding of Israel in May 1948, and Israel's war against the invading armies from then until July 1949.
The USSR leaned towards supporting Israel during the Israeli-Arab war, although it was anti-zionist. The USSR believed that it would be most likely for Israel to form a communist or at the even more likely, a socialist government, therefore they supported its creation. They even helped to supply Israel with weapons which it funneled through Soviet Bloc states. The United States also sold weapons to Israel. Israel understood tensions between the US and the USSR, therefore they were able to play off of this tension to gain support from both powers. As both powers wanted influence in the region, they were willing to help Israel so that eventually Israel may side with their particular model of government and society.