It can be either, depending on whether it refers to something
done well (an adverb) or someone who feels well, or healthy (an
adjective). Well can be an adjective, adverb, noun, verb, or
interjection.
Well is an adjective in this sentence: All's well that ends
well.
Well is an adverb in this sentence: I don't feel well.
Well is a noun in this sentence: My dog fell in the well.
Well is a verb in this sentence: Tears well up every time she
sees that movie.
Well is an interjection in this sentence: Well! I won't take
that!