Afri (singular Afer) was a Latin name for the Carthaginians. Latin-speakers at first used afer as an adjective, meaning “of Carthage”, “of Africa”. As a substantive, it denoted a native of Africa, i.e., a Carthaginian. Afer, an individual of the Afri tribe after which the continent of Africa is probably named. Afer means “African,” one of the terms applied by the Romans to indicate a Black African. From this “Black” and “African” became synonymous terms.

This ethnonym (Afer) provided the source of the term Africa. The Romans referred to the region as Africa terra (land of the Afri), based on the stem Afr- with the adjective suffix -ic- (giving Africus, Africa, Africum in the nominative singular of the three Latin genders).

Following the defeat of Carthage in the Third Punic War, Rome set up the province of Africa Proconsularis. During the period of the Roman Empire, Afer came to be a cognomen for people from Africa. Proconsularis.Publius Cornelius Scipio Africanus (236–183 BC), also known as Scipio the African, Scipio Africanus-Major, Scipio Africanus the Elder, is best known for defeating Hannibal at the final battle at Zama, one of the feats that earned him the agnomen Africanus. The Latin name Africa came into Arabic after the Islamic conquest as Ifriqiya.

As Europeans came to understand the real extent of the continent, the idea of “Africa” expanded with their knowledge. According to Wikipedia on Africa:

Other etymological hypotheses have been postulated for the ancient name “Africa”: • The 1st-century Jewish historian Flavius Josephus (Ant. 1.15) asserted that it was named for Epher, grandson of Abraham according to Gen. 25:4, whose descendants, he claimed, had invaded Libya. • Isidore of Seville in Etymologiae XIV.5.2. suggests “Africa comes from the Latin aprica, meaning “sunny”. • Massey, in 1881, states that Africa is derived from the Egyptian af-rui-ka, meaning “to turn toward the opening of the Ka.” The Ka is the energetic double of every person and the “opening of the Ka” refers to a womb or birthplace. Africa would be, for the Egyptians, “the birthplace.”

Yet another hypothesis was proposed by Michèle Fruyt, linking the Latin word with africus “south wind”, which would be of Umbrian origin and mean originally “rainy wind”.