For at least 40,000 years before the first British settlement in the late 18th century , Australia was inhabited by indigenous Australians , who spoke languages grouped into roughly 250 language groups .