The Hakka are one of the major subgroups of the Han Chinese. Han is the majority ethnicity, and when someone says "he's ethnically Chinese", that usually means Han.
Hakkas are Han, but they're a subgroup and in many ways a distinct ethnicity themselves. They differ from other Han groups in language, culture, dress, food and history, and they make up about 3% of the population but have an overwhelmingly higher rate of holding official office, in large part because of some of the history, addressed below.
The name "Hakka"
The modern name 客家 hak-kâ is often translated as "Guest people", but there's actually some debate about whether this is the actual etymology or not. I can't find the paper at the moment but there's a scholar who's provided some indication that that is not a correct translation, and that it should be something else. However this translation is reflected in the Chinese characters and has caused them no amount of trouble in the past few centuries.
Actually there's a scholar named Ling Zhenghui 林正慧 who's written on the topic of the name, and has pointed out that actually in historical sources, 客 ("guest") often referred to the Yue (Cantonese) in Qing sources, so the issue is even further clouded. Meanwhile it was probably not until the early 1800s that the label of "guest person" stuck as referring more singularly to the Hakka.
Geographical Origins
The precise origins of the Hakka are not known. There are multiple theories, but the historical records aren't always clear, and there's the added problem that if someone is Hakka now, how far back can you trace ancestry and still be Hakka (or any label, really). We have family histories that place ancestors of Hakkas in the far north, but whether they were there as a distinct group at the time is unlikely to ever have a clear answer. We have records of multiple migrations of the ancestors of modern Hakka going back quite a ways, and so people will say that those were Hakka, but it's clear that at least culturally and linguistically as well as historically, the notion of being Hakka is more recent.
The most widely accepted origin is the Central Plains (中原) region of China. This is actually not really surprising. If there's been one overarching trend in China's history for the past few thousand years it's that people go south. The majority of ethnic groups found in South China and Southeast Asia can trace their origins further north into China than they're found today.
A great many historical figures have been Hakka, Deng Xiaoping being one notable example, and Hong Xiuquan who lead the Taiping Heavenly Kingdom in the civil war known as the Taiping Rebellion was also Hakka. So were Hu Yaobang, Lee Kwan Yew, Lee Teng-Hui…
There is an old theory by Luo Xianglin^1 that there were five distinct waves of Hakka migration, but again this gets into the issue of who was Hakka when, so it's probably best to skip that for now, as Hakka identity is a more recent thing, and at least certain aspects of the culture we can pretty clearly date to having arisen only in the past 1500 years (e.g. the language)
So we'll skip the details on where they're from since so far we're still not in agreement.
Modern Locations
These days the Hakka are found primarily in the provinces of Guangdong and Fujian in China, as well as in smaller numbers throughout the south, and in Taiwan, mostly in the Northwest and on the east coast. In Fujian they're known for their round housing complexes known as tulou 土樓, and throughout the region they're known for their style of dress, which tends to be dark blue and simple for men, and bright floral fabric for women.
They also live in large numbers in diaspora communities throughout the world. I meet a lot of Hakka people in my day-to-day, and it's no uncommon to find them from Malaysia, Singapore, East Timor, Mauritania, Canada, Jamaica… Pretty much anywhere that's ever had a Chinese community will also have Hakka people.
A fair amount of the early spread has been attributed to some economic successes in the middle of the Qing period, which allowed them to migrate to other parts of the continent where they came into conflict with the landed classes.
History — Selected Events
Their history has generally not been so positive, at least as far as interactions with other groups. Conflict has followed the Hakka to many of the places they've gone.
In the 1300s the Ming Emperor pushed many of the original settlements out of large areas of the South, and it was the Hakka that replaced them. This of course was less than well received by those that they'd replaced.
Later, in one of the most notable instances of trouble was the Punti-Hakka Clan Wars from 1855-1867, the very name of which expresses their other-ness. Punti 本地 effectively means "original inhabitants" and refers to the Cantonese (Yue) people living in the area before the arrival of the Hakka. Long story short, as the Qing was slowly replacing the Ming as the ruling dynasty, populations in the South fell due to war and migrations and, more directly, the Qing emperor forcing evacuation of the coastal areas to help combat piracy. During this time upwards of 90% of the local population died, and when people were once again permitted to live there, the original families that survived mostly did not return, so the Hakka filled the gap as the court was attempting to encourage repopulation.
This added to the history of conflict between these groups in the region, and it eventually caused strain as the locals who'd already been there felt resources become more scarce, and eventually this led to armed conflict between the Hakka and the Yue (Penti).
The Taiping Rebellion was initially also Hakka endeavour, though one led by what many would call a delusional narcissist and not someone who was actually focused on the Hakka. However any discussion on the history of the Hakka needs to at least touch on the Taiping. What became the Taiping Heavenly Kingdom actually had its roots in another Hakka social group known as the bài shàngdì huì 拜上帝會 (Society of Worshiping God), which was yet another straw on the camel's back that led to the Punti-Hakka Clan Wars. The landed Punti in the south saw the starkly different culture of the Hakka as a threat, adding to already growing economic tensions between the Hakka and the more established populations.
Similar conflict to the Punti-Hakka Wars has also occurred in diaspora communities, often based on a similar situation of conflict over resources. Malaysia had significant conflict following the lines of the Punti-Hakka Wars happening in China.
And elsewhere similar efforts at repopulation have depended heavily on the Hakka, which has further contributed to their stigmatised status. Adding to that is the fact that the constant moving meant they had less time to settle and develop their land, had access to lower quality (more mountainous) land than the more established groups, and as such ended up having greater poverty than other groups, further stigmatising them. This higher rate of poverty still exists today, despite their general political success.
However they also played an incredibly important role in the past century, holding major positions in the Communist revolution. Having been stigmatised and marginalised throughout their history, armed revolution has been a good fit. For the then-growing Communist revolution, the Hakka were an integral part. They were able to provide important intelligence, offer material support during the Long March. Even their language was used much the way Navajo was during WWII, with only half-coded messages in Hakka being relayed on behalf of the communists.
Unfortunately the marginalisation continues. Even today in Taiwan where many Hakka have lived for seven or eight generations, there is still a distinction between them and "Taiwanese" (Min speaking/Hoklo) people. In Taiwan this stronger sense of modern Hakka identity didn't start until the 1960s through to the 1980s when a large number of Hakka who had lived formerly in villages like Neili (having replaced the aboriginals during the Japanese occupation) started moving into cities, and their "other-ness" became more apparent.
(Continued below because of comment length limits)