It was originally used in insurance to describe a situation where the people who take out insurance are more likely to make a claim than the population of people used by the insurer to set their rates. For example, when setting rates for a life insurance contract, a life insurer may look at death rates among people of a certain age in a certain area. Now suppose that there are two groups among the population, smokers and non smokers, and the insurer can't tell which is which so they each pay the same premiums. Non smokers know that they are less likely to die than average an that they are cross subsidising smokers, so will be reluctant to insure themselves, while smokers will have a higher likelihood of claiming so will be more likely to buy insurance. The insurance company ends up with people with higher average mortality rates than allowed for when setting premiums.
A key condition for there to be adverse selection is an asymmetry of information - people buying insurance know whether they are smokers or not, whereas the insurance company doesn't. If the insurance company knew who smokes and who doesn't, it could set rates differently for each group and there would be no adverse selection.
The concept of adverse selection has been generalised by economists into markets other than insurance, where similar asymmetries of information may exist.