This is a common problem, even for native English speakers. As a previous answer pointed out, "good" is an adjective and "well" is an adverb. That means that you would use "good" to describe a noun. You would use "well" to describe an action.
A notable example would be, "This dish tastes good." This is a common phrase in English, and it can lead to confusion because taste is usually an action verb, which would make it seem like this is incorrect. But, "taste" can also be used as a linking verb, which means that in this case taste could take the place of a state of being verb (is) in which case "good" is describing the noun "dish". A good rule to follow might be that if you can replace the verb with a state of being verb (is, are, was, etc.) you can use "good". If the verb is strictly an action, you would use "well".
A common mix up that frequently is heard is when people are asked the question "How are you?" Many people answer, "I am good." Some people answer, "I am well." In the first answer they are saying that they are a good person, which they may not necessarily mean. In the second answer they are saying that they are in good health, which is usually exactly what they mean.