1999 GMC

my heat would at first was working then it started coming on when it wanted to. for the past three days it has not came on but the heat from the motor helps keep the car warm. what is my car problem