Sometimes I turn the key and she turns and fires right up np

Sometimes I turn the key and it’ll just click, then I turn the key back and then to start again and she turns and fires.

Sometimes click, then click, then click and then she turns and fires after my stomach drops to the floor

Knock on wood, I haven’t been left stranded yet

Is the starter going bad, is there a solenoid to look at, or is it something as simple.as battery terminal contact?