Musk, like most modern billionaires who made their money through tech did not have a load of money to start with. Neither did a lot of previous self made men.
He's from a very wealthy family, his dad owned an emerald mine and funded his first business, though it was obviously small fry compared to where he's ended up.