What are the difference between incident, issue, and affair? How should one use them?
An incident is a single distinct event - one occurrence of something that can happen more than once. It is often unpleasant and/or unexpected.
Issue has lots of meanings. Given the other words you're asking about, the meanings you might be thinking of are (1) a problem, something that needs to be discussed/fixed; or (2) a topic of interest.
The first meaning that springs to mind for affair is the extra-marital kind, but it can also mean a social event (of the dress-up kind), or a plain old (read: not sex related) scandal.
(I've linked each word to the definition with the most examples of usage that I could find.)
After that incident with the neighbor's dog, he avoided chihuahuas like the plague.
After that affair with the neighbor's dog, he avoided chihuahuas like the plague.
The incident probably took less time than the affair - for the former, I'd imagine the dog scared the man, while the latter might have involved an actual bite and subsequent lawyers and suits and animosity.
After that issue with the neighbor's dog, he avoided chihuahuas like the plague.
Here the implication is that there was a problem which had (or should have had) a solution. I'd imagine the dog peed somewhere inappropriate, or something similar.