Elon Musk was born on June 28, 1971, in Pretoria, South Africa. He developed an early interest in computing and technology, teaching himself computer programming at a young age. Musk moved to the United States in 1995 and attended Stanford University, where he pursued his entrepreneurial ambitions.