KPIs evaluate the success of an organization or of a particular activity in which it engages. Often success is simply the repeated, periodic achievement of some levels of operational goal (e.g. zero defects, 10/10 customer satisfaction, etc.), and sometimes success is defined in terms of making progress toward strategic goals.
Accordingly, choosing the right KPIs relies upon a good understanding of what is important to the organization. 'What is important' often depends on the department measuring the performance - e.g. the KPIs useful to finance will really differ from the KPIs assigned to sales.
Since there is a need to understand well what is important (to an organization), various techniques to assess the present state of the business, and its key activities, are associated with the selection of performance indicators. These assessments often lead to the identification of potential improvements, so performance indicators are routinely associated with 'performance improvement' initiatives. A very common way to choose KPIs is to apply a management framework such as the balanced scorecard.