The first people in Southern Africa were the San. They were nomadic hunters who stuck together in family-related bands, but were supplanted by the Khoi-Khoi, sometimes known as the Nam, whose livelihood depended on livestock and who made some rather early pottery. They were also cave painters. The Khoi-Khoi gradually replaced the San in Namibia, moving northward from what is now South Africa, and remained the largest presence in the region until 1500 C.E. It was at about that time that the Herero people moved into the area. There were still some San groups in Namibia, and there were also some Bantus on the south-central plateau who organized tribally starting in 400 B.C.E., too. These Bantus were militarily more effective than anyone else and tended to dominate other groups with whom they came into contact. Starting in the 1800's there were also some Ovambo migrating in as well.
Namibia's coastline is exceptionally uninviting, apparently, and the first Europeans didn't enter the area until the Portugese arrived in the late 15th century. They had pressing business in the East Indies, however, so they just put up a bunch of stone crosses as navigational aids along the coast. Although a few British and German missionaries moved in in the 1800's, that coast must have been some kind of nasty, because it was a full four centuries before the place was annexed by any other European power (although a few Dutch and British captains tried to lay claim to parts of it in the 18th century, their governments said they didn't want it). In this case it was Germany who took it in 1884, although Walvis Bay, right in the center, was taken by the British before them in 1878. No time was wasted in pissing off the natives by putting them to work at forced labor, and a rebellion led by the Nam and Herero people was put down with a minimum of delicacy in 1904. 54,000 Herero died under the brutal German response, quite a few of whom died from being chased into the Kalahari desert. There were only about 70,000 Herero to begin with. 30,000 non-Herero also died. sid has a great piece over at Herero Genocide about this.
It was at about this time that a South African worker found diamonds east of Luderitz. The Germans wasted no time in branding everything between Luderitz and the Orange River off-limits to natives, and Europeans began to flood the area. The Germans weren't in control for too much longer, though, as Namibia was lost to Allied South African forces during World War I. The territory, then known as West South Africa, was managed by South Africa in in response to a mandate by the League of Nations at the war's conclusion. Not too much happened between wars, although a subset of the Nam, the Bondelzwarts, rebelled and were bombed off the planet by South African planes in 1921-1922. After World War II, South Africa wanted to annex it outright, but had to settle for simply exercising authority over it, this time having been asked by the U.N. Still, they increased their influence and established a white parliament in 1949. As a result, Namibia's arable land was divided into 6000 white-owned farms and the country's black population sent to a few reserves around the country. Forced labor, established back in the days of German rule, continued as it had for some time.
When nationalism really started to get going in Africa during the 1950's, the Namibian population started to get pissed. Realizing that they could do something about their sucky situation, many demonstrations were held, political parties formed, and strikes organized. Several groups consolidated in 1960 as the South West Africans People's Organization, or SWAPO, backed by Liberia and Ethiopia, to take the South Africans to the International Court of Justice in order to end the occupation. The court was rather ineffective, saying that because the SWAPO was in exile they had no right to bring the case concerning South West Africa, but the U.N. voted in 1966 to rescind the South African mandate to rule Namibia, thusly renamed in 1968. They set up the Council for South West Africa to rule instead, although no one really listened to them, unfortunately. SWAPO began to fight back against the South Africans at about this time but were unable to establish an externally recognized government, so the South African troops remained in the country. Claiming that they wouldn't move until the 19,000 Cuban troops in Angola were removed, they continued to occupy the territory, provoking intensified guerrilla action on the part of SWAPO, especially in the northern part of the country.
This went on for a while despite repeated insistence by the U.N. and the International Court of Justice that South Africa was out of line, what with their establishing homelands called Bantustans around the nation and whatnot (despite popular boycotts of the Bantustan elections). The U.N. called for a cease-fire in the guerrilla warfare and asked for elections in 1978, the year by which South Africa had promised Namibian independence. Although South Africa tried to impede the process, domestic trouble there and popular resentment of the war on both sides eventually led to a willingness to grant independence. The U.N. tried again, and this time with American help negotiated the removal of the Cubans and the simultaneous removal of the South Africans. The U.N. also supervised democratic elections in November 1989, and SWAPO won the vast majority of the votes. A constitution didn't come until 1990, but with it came independence, headed by SWAPO's head, Sam Nujoma. He was re-elected in 1994, the same year Walvis Bay and some offshore islands were ceded to Namibia, on a platform of economic recovery. In 1998 he decided to tie the country's currency to the South African rand. There had apparently been too much stability, however, so in 1999 Namibia allowed Angolan troops to attack National Union for the Total Independence of Angola (UNITA) rebels who were hiding in north Namibia. This was part of a mutual defence pact, but it has really not helped Namibia. It's contributed to northern instability and is, after all, a war being fought on home soil. Namibian troops are also fighting in the Congolese civil war on the side of Laurent Kabila. Nujoma was reelected in 1999 after the constitution was changed to allow him to run again.