Hello. Thank you for coming to JustAnswer.
Sorry for the wait. My name is Michael. I will be helping you with your question today.
It sounds like your phone is SIM Locked by a previous carrier. You will need to contact the original phone's carrier to have them unlock it to use it with another SIM. I have an article with information about this (the article is not about this model phone, but the same exact thing applies to the Samsung Galaxy).