Each item has a predetermined max upgrade. You use the magic stones to break this limit by 5 levels. In the top left corner of your item info screen there is an icon which relates to the kind of item it is and which stones you will need to use to break upgrade limits. You can also use stones to upgrade your pet, but you use lots and more than one type.