The affinity of an enzyme or a protein transporter indicates the strenght of the binding of substrate/solute. An enzyme with higher affinity binds its substrate more strongly than a counterpart with a lower affinity. Is affinity always a function of the protein structure of enzyme? If the same enzyme in two different species had different affinities for substrate, would that indicate that there were differences in amino acids at the binding sites of the enzyme in the two species?
In a reaction which follows a saturation kinetics, KM is basically the concentration of substrate/ligand at which the rate of the reaction is half of the maximum rate (or the binding sites are half saturated).
The biophysical meaning of KM would depend on the underlying model. For example, in the equilibrium approximation of Michaelis-Menten model, KM is same as dissociation constant (of enzyme and substrate). In the Briggs-Haldane model (quasi steady state approximation), it is slightly complex: KM = (kr + kcat)/kf.
Overall, the thumb rule is that lower the KM faster will the reaction saturate.
Is affinity always a function of the protein structure of enzyme? If someone study same enzyme in two different species and observe that the enzyme has different affinities in two species, then does it indicate that there might by slight difference in key amino-acid component at the binding sites of the enzyme between these two species?
Almost every property of the protein (not just affinity towards a ligand) is because of its chemical composition and structure. Although they are directly involved in binding, the amino acids at binding site are not the sole contributors to the affinity. The other amino acids that are critical for the overall structure of the protein are also important in preserving the function.
I will add to the answer by @WYSIWYG by turning your question round: “If you changed the amino acids at the binding site, would this affect the affinity of a protein for a ligand*?”
The answer to this is yes, and for an enzyme you can change the substrate specificity entirely, as one can discover from reading this review by Wilson and Agard.
However one should also be aware that changing residues at parts of a protein outside the ligand-binding site can also affect the affinity of binding — see, for example, this paper by Oue et al.
[*This makes the question more general to include other proteins that bind ligands such as membrane receptors and transport proteins such as heamoglobin.]