Sounds like either your refrigerator has lost is refrigerant or the air passage way from the freezer to the bottom part of the refrigerator is blocked by ice.
If your freezer is getting cold but the refrigerator isn't then it's most likely your air passage way from the freezer to the refrigerator is blocked up by ice and or the fan that blows the air is iced up or not working.
The refrigerator portion is cooled by the freezer and has an air duct that sends the cold air to the refrigerator part.
If the freezer isn't getting cold either and the compressor is running then most likely the lines have developed a tiny leak due to corrosion and the refrigerant leaked out.
If that's the case then it'd be better to just go out and buy a new refrigerator as the cost to repair the refrigerator would most likely cost you half as much as buying a new refrigerator.