A huge number of immigrants came to California in the 1840s and 1850s. Many of these people came from other parts of the United States as part of the Gold Rush in 1849 (that's where we get the term 49ers). Many, many others came from China and East Asia to do difficult manual labor jobs. The Chinese in particular experienced terrible racism and oppression. The U.S. even passed a law called the Chinese Exclusion Act, which was designed to keep Chinese people out of the country.
Meanwhile, the huge influx of immigrants of all kinds tended to have very negative effects on Native American populations, who often lost their lands as new arrivals placed new pressures on land resources throughout the state.