I don't play too much bass, mostly guitar, so forgive me if it sounds like I really don't know what I'm talking about.

I was playing my bass last week and the sound kept cutting out. It would go off and then go back on. It kept doing that until it went out and wouldn't make anymore sound. I checked the amp, cords, battery. All were fine.

I came to the conclusion that the problem had to be inside. I opened it up and jiggled all the wires. The little black box thing that the cord plugs into seems to me like its the problem. But how do I know? What is it and can I buy it anywhere? To add to the problem, a black wire disconnected from its spot while I was tinkering with the black box, so now I really don't know how to fix it. I could solder it if i knew where it went, but I don't.

Anyone encounter a similar dilemma?

My bass does that sometimes. It could be caused by the pieces of metal that are meant to make contact with the tip of the cable being too far apart, I bend them inwards a bit and that usually works.

I have no idea about any of the interal wires or anything though.
If music was the food of love I'd be a fat romantic slob.
If you don't know what you were looking at then almost anything is possible and no-one can really diagnose the problem over the internet but from your description you have most probably broken the earth lead off your jack socket. It isn't a complicated repair but you need to know a little to fix it, probably best to take it in to a repair shop unless you know someone with a little knowledge. There may be more than one fault.

If it is any consolation the black wire may have been about to break anyway and caused your initial problems you may have done no damage by tinkering.

If you go into gear maintenance in the columns there is an article on fixing intermittent faults

Good luck