Pashto is a member of the Iranian branch of the Indo-European languages. It is classified this way mainly for historical reasons and is not, in fact, related to Dari, Farsi, or Kurdish, except for its comparatively large amount of loan words. Structurally it most closely resembles several Inuit languages.
Pashto is one of very few split ergative languages still spoken, and its sentence structure is Subject - Object - Verb. Conjugation of verbs is extremely difficult, since there are virtually no "rules" for four of the six tenses used - the vast majority of verbs are irregular for most conjugations. Another difficulty with conjugation is that adjectives change form according to verb tense.
It is written in an Arabicized Naksh script, and features several characters not found in any other language using scripts from the Perso-Arabic family. Among these are retroflex versions of several of the consonants. The differences in common and retroflex versions are notoriously difficult to distinguish by non-native listeners. It also combines diacritic marks into several of its characters but does not, as a rule, use diacritics at all except in reference or educational settings, unlike Arabic.
There are literally hundreds of microdialects of Pashto, but in general the three major are the Northern, Qandahari, Waziri, and Peshawari. In general the dialects are mutually intelligible, with the notable exception of the Waziris. Often a Waziri Pashto speaker will resort to an intermediate language, usually Dari, with a Pashto speaker from another region. Pashto speakers often borrow heavily from the vocabulary of local non-Pashto languages. Peshawari Pashto uses a large amount of Urdu and Hindi vocabulary due to proximity with Urdu and Hindi speakers. It is not uncommon for a native speaker to know ten different words for something, but to also not know which word originates in which language.
In practice, nearly all Pashto speakers are Pashtuns. Very few non-Pashtuns bother to learn Pashto, but nearly all Pashtuns speak at least two languages fluently. Often they speak Pashto, Dari, and at least one other, sometimes Urdu or Hindi depending on where they grew up. Many Pashtuns have rudimentary ability in as many as five languages, often including Arabic.
Pashtuns are the majority ethnic group in Afghanistan, with a population estimated at 40-45% of total. There are also strong Pashtun populations in Pakistan and other surrounding countries. Many Pashtuns do not recognize the Afghanistan/Pakistan border, called the Durand Line, which was drawn after the cessation of attempted British colonization in Afghanistan and the associated wars. Instead, they recognize the traditional borders of Pashtun tribal lands, which includes the Southern half of Afghanistan and also a large part of Pakistan, known as Peshawar to Pashtuns and much of Afghanistan, who consider it "theirs". It is shown on most western maps and known by Pakistan as the "Federally Administered Tribal Areas". The total area of these parts spanning across Afghanistan and Pakistan is known as "Pashtunistan" to Pashtun nationalists. There is also a small population of Pashtuns in India, where they are known as "Pathans". Very few, if any, Pathans speak Pashto - most of them speak the local languages. Most Pathans, however, retain their Musim faith and tribal identities.
note: There is an endless amount of argument, even among native speaking scholars, about hundreds of details of the Pashto language. It is important to understand that much detail on many skull-numbing concepts has been omitted in order to even present something resembling a comprehensive statement on the language. This statement has been made on the basis of over a year of study with some of the few university-educated Pashto scholars in the U.S. There is currently no university or college in the United States or, to the best of my knowledge, anywhere in the world outside of Afghanistan, offering degrees in Pashto. There are several U.S. schools that offer sporadic "Introduction to Pashto" courses.
further note: the "authoritative" English-language work on Pashto is Dictionary of the PUK'HTO, PUS'HTO or Language of the Afghans by Capt. H.G. Raverty, London 1860. It includes an essay on the language, and this is the work from which nearly every other source for the history and classification of the language is derived and is considered the authoritative English translation dictionary for classical Pashto works.