Yes, there are a fixed number of slots, each of which is a different size. So, for example, you can get 8 ton cargo racks, for some slots, but only 4 ton cargo racks for others...
yes, also you are limited to what you can add, by the numerical size of the internal compartment. ie Sidewinder only has Size 1 and 2 Internal compartments, whereas an Eagle has a Size 3 as well ( going from memory) And as far as Ratings go, I is worst and A is best.
Yeah you've got Class and Grade, your ship will have a limit on the number of slots, those slots will have a max Class.
So you can't fit a Class 3 shield in a Class 2 slot.
Grades are the quality of the item, a Class 2 Grade E is worse than a class 2 Grade B. Grades can really push the price up and it's worth checking the knock on effect of installing. Don't want to end up short on power or with a unnoticed jump range reduction.