Sounds like your theft deterent system is engaged; for that you will need to go to the dealer (tow car to dealer). My 1996 had the same problem. They will have to replace the module in the dash or re-work it.
Make Model and Year please.
Worn or frayed wire to starter?
Check all the connections. Sometimes the ends of the battery cable are corroded where they connect to the starter and engine. Switch itself could be bad. Try the starter either by shorting across the terminal on the solenoid or run a jumper wire to the solenoid and try starting it several times in a row. If it works that means the starter is probably alright and it is in the wiring somewhere. Try the same thing with the switch. Short across the wires at the switch and if the starter seems to work each time, it may well be the switch. The contacts in the switch may be getting burned and not making good contact.
== == Try tapping on the solenoid(smaller cylinder attached to starter) while someone tries to start it. If it starts then the solenoid is bad and the entire starter solenoid needs to be replaced.
resistance somewhere in starter circuit
Could be a faulty ground wire. Not very rare to happen
check your battery, maybe it's time to replace it
Sounds as if the starter bendix is staying engaged in the fly wheel. Possible wrong starter or starter needs shimmed down out of the fly wheel .
Did you put the shims back in when you replaced the starter. Maybe too tight to the flywheel. Just a guess.
Your battery could need replaced, your alternator or starter could be going bad. It is best to have a mechanic look at it if this bothers you or it continues.
water in the gas.
There could be an issue with your starter or the starter solenoid. Have it checked, but either part might need to be replaced.