A fraction is a number that names part of a whole or part of a group. The denominator represents the total number of equal parts the whole is divided into.
A ratio is a comparison of two quantities.
For example, suppose that there are 10 boys and 8 girls in a class. There are 18 students in total, so the ratio of boys to students is 10:18, and in this case it's natural to say that the boys make up 1018 of the class.
On the other hand, the ratio of boys to girls is 10:8, and this doesn't naturally suggest any particular fraction.