Credit scores are given based on credit reports these contains your credit history (Credit cards, loans, and in some places monthly payments to contracts (e.g. mobile contracts )
From your credit report compiled by the credit reference agencies (e.g. Experian and Equifax) and in addition to other information you provide on the application individual companies generate their own credit decisions based on their own rules. No-one knows theses rules exactly but an outline of some strategies can be found here although companies can still chose their own. some companies may take into account opportunities to cross sell or other factors in addition to your credit history
Credit scores provided by reference agencies to individuals are therefore simply an indication of your likelihood to be accepted for credit by a generic company - in some cases an excellent credit history may even work against you.
Further US specific information can be found here. Some information specific to the UK can be found here