when you attach this small script to a gameObject it will add script1 component to it's inspector and the script1 component has a slot called ball. you should drag a prefab to it and then the code will instantiated that dragged prefab.