fridgidaire

I hear a buzzing sound near the compressor every 2 or 3 minutes and the freezer wont make ice then after a couple of days the thing starts working again not sure if its on its way out or if its the compressor or the relay on the side of the compressor , the ice starts melting and the fridge starts to get warm, its been 3 weeks of this. can the compressor work interminent or does it just go bad and not work at all? Please Help Me!!!