Hello Ayman,
These two tenses always get mixed up because of the fact that they are both talking about the past. As a general rule if it is a completed action in known past time then you should use the past simple.
"I went to the shop this afternoon." (writing in the evening)
It is is an action in the past but it is not clear when it is and/or it is in unfinished time, you usually use the present perfect. There will usually also be a result in the present.
"I've been to the shop today." (Today is not finished, and the present result is that we now have food in the cupboard.)
Hope this helps
Bob