What is an Affix?
A word can be separated into two parts, its root and its affixes. The root is where the principal meaning of the word is found. An affix is what modifies the meaning of the root.
So let's use the the word improperly as an example. The root is proper and the affixes are im- and -ly. We add the affix im- to convey the meaning "not" and -ly is added to change the word proper from an adjective to an adverb.
We have three different names for affixes based on where they are found in relation to the root. A prefix (such as im-) which is added to the start of the root, an infix which is inserted inside the root and the suffix (such as -ly) which is added to the end. English, as far as I know, doesn't really have infixes with the possible exception of things like fanfuckingtastic. Words like girlishness have two suffixes (-ish and -ness) not a suffix and an infix.
Derivational vs. Inflectional Affixes
The function of an affix is either derivational or inflectional. An affix is derivational when it changes the category a word is found in. So with improperly the -ly suffix is derivational because it changes an adjective into an adverb. A common english affix is the derivational suffix -er which, when attached to a verb, sometimes forms a noun. For instance, the verb teach becomes the noun teacher.
In contrast to derivational affixes, inflectional affixes make grammatical distinctions within the word's class. For instance you add -ed to many verbs to show the past tense, work becomes worked. Another example of an inflectional affix would be taking an adjective like short and adding the -er suffix to make it comparative, so short becomes shorter.
What we are talking about here, Affixation, is a part of a branch of linguistics called morphology which is concerned with how words are formed and interpreted.