There are two things that ethically sourced coffee tries to ensure -
1. the coffee is grown in sustainable practices that fairly compensates the farmers and
2. the farming practices used are less harmful to the environment.
When shopping for coffee in a supermarket, looking for the beans that are Fair Trade or Direct Trade certified ensures that the coffee has been sourced following strict standards that improve the living conditions of the farmers and follow sustainable farming practices.
Specialty roasters today often work in direct partnership with the farmers, which means that this coffee is ethically sourced as well.
Coffee sourced this way has further benefits - it allows the roasters to have more control over the quality of the beans and the farmers can understand more about what cafes are looking for.
The improved quality of the beans then allows for a higher price. Then, the roasters ensure that the farmers receive higher profits for their efforts and improve the quality of life in the farming communities.