Use good before the noun (good idea) or after a form of the verb "to be" (the food is good; the drinks are good; the party was good).
Use well after the verb - He sings well, they dance well, I didn't sleep very well.
There is one exception - when somebody asks "How are you?" native English speakers often say "Good!" or "I'm good!" Although this is not technically correct, it is much more common to say "I'm good" than "I'm well" in response to this question.