I have very recently pulled my electric guitar and amp out of my closet to see if it still worked. The amp turns on and works but there is a buzzing sound coming from it, what could be causing this? Is it the cord or the input/output jacks? Also, the head phone jack only works when i pull the headphone to amp adapter out about halfway.

Im just wondering if these problems would be caused by the amp itself or the cord/adapters/etc.

Thanks in advance,
use some electrical contact cleaner to clean the input jack. Spray it on the guitar cord and work it in and out a few times.

Sounds like it is dusty/dirty from your description
2002 PRS CE22
2013 G&L ASAT Deluxe
2009 Epiphone G-400 (SH-4)
Marshall JCM2000 DSL100
Krank 1980 Jr 20watt
Krank Rev 4x12 (eminence V12)
GFS Greenie/Digitech Bad Monkey
Morley Bad Horsie 2
MXR Smart Gate
Check your cable, I sometimes get buzzing from my amp because I have ****ed up cable. I need to get a new one.
Be careful. Buzzing can be caused by a faulty earth. Get somebody that knows what they are looking at to check it out.
Gilchrist custom
Yamaha SBG500
Randall RM100 & RM20
Marshall JTM45 clone
Marshall JCM900 4102 (modded)
Marshall 18W clone
Fender 5F1 Champ clone
Atomic Amplifire
Marshall 1960A
Boss GT-100

Cathbard Amplification
My band
What amp is this exactly?

+1 Cathbard. Could be an electrical problem. And like Robb said, if you use contact cleaner don't spray it in the holes, work it in using the jacks. Does the amp have an effects loop? When using headphones does it sound normal?