How to get component from prefab?

I make game where is object coincreator. That make coins randomly. I tried to move coin every time when my player move but when I try to get component so i can move coin its say that its null. When i drag and drop current coin to script then it work. I hope you understand and can help me. Thank you so much answers. C# pls.

@username
instantiate your prefab and assign it to an empty gameobject like this :
GameObject temp = instantiate(yourPrefab) as gameobject;
now get component on temp gamneobject