The British recruited Jews detained at Cyprus for attempting to immigrant to Mandate Palestine. They were given some the best training Britain could offer to fight the axis. After the war these well trained battle hardened veterans were the core of the IDF during Israel's war of Independence. After that they developed based upon experience.
While the Israeli military mainly train themselves, they have received additional training and help from the US military, due to both nations being Allies.
I know the Israeli Air Force trains with the U.S. due to flying the same airframes, I can't speak for the other branches, but I'm willing to bet the U.S. has helped there as well.