Hello everyone,I wish you a happy new year.
I have a 1997 Camry 4 cylinder, I didn’t drive it for a while and I got a new battery and I started it and I run it for 5 min and turn it off and I tried to start it again,and it clicked first and it started on a second time then when I turn it off I heard a sound from the starter cranking by itself and I had to disconnect the battery to make it stop.and when I try to reconnect the battery it started the same cranking noise.what is going on?
I found your schematic with a quick web search. according to the diagram the relay is in your "left front fender apron"
When it tries to start itself again, yank it out and see if it stops. If it doesn't then the starter is bad.
If it does, then change out the relay. If it still doesn't help then it's your ignition switch.

Thank you everyone, now that is a real kind of help.you lay down the science and it’s amazing. I will start by removing the relay first and see how it goes. Thank you very much
starter relay could have welded itself shut, or there's a short on the starter terminals. You'll have to do some investigation.
Why the starter keeps engaging?
I gave you my theories why. Now you need to go put your eyeballs on the starter terminals, and perhaps try switching the starter relay with another one.
Why the starter keeps engaging?
@imperator explained that, you have an electrical fault that you need to find.
Thank you chuck,but that was my original question,what are the electrical problems that caused this problem,how do I find out ?
As he said the primary suspects are your ignition switch and starter solenoid. You find out by tracing out the circuit and finding the fault using a test light or voltmeter. A wiring diagram would be useful.
Actually I see the ignition switch wasn't mentioned before, it's something I was thinking of. What I would probably do is start by disconnecting the solenoid trigger wire from the starter. If the problem persists the solenoid is at fault. Otherwise, check for 12V at the trigger wire and trace the circuit back until you find where the voltage is coming from. (All this with the ignition switch off and the key removed of course.)
what are the electrical problems that caused this problem,how do I find out ?
Your description indicates your starter works, but the solenoid isn't engaging. May be that simple, it's bad. If you start looking there first, I believe diagnosis will be made easier.
Actually it sounds to me like the opposite problem, the starter is spinning and cranking the engine by itself even with the key out and the battery has to be disconnected to stop it.
so the starter&solenoid are working.. but the starter won't shut off, even when he cuts the car off, right ?
If I'm reading it right that's the situation.
Seems either a fuse, relay, or solenoid.. something fused along that closed circuit, keeping it closed.
A wiring diagram of that circuit would probably help. Maybe @jack62 can come up with one?