1. This food smells bad. You had better throw it away/out.

2. The bear can smell well.
3. The bear is smelling the person lying on his belly.
4. He is smelling the fish.

(Are they all grammatical? In terms of the use of the verb smell...Thank you.)

Yes.

Yes, all the sentences are grammatically correct in terms of the use of the verb "smell."

In the first sentence, "You had better throw it away/out," the phrase "smells bad" is used to describe the food. This sentence suggests that the food emits an unpleasant odor, so it is recommended to discard it by throwing it away.

In the second sentence, "The bear can smell well," the verb "smell" indicates the bear's ability to perceive odors effectively. It suggests that the bear has a strong sense of smell.

In the third sentence, "The bear is smelling the person lying on his belly," the verb "smelling" is used to describe the action of the bear using its sense of smell to perceive the person who is lying on their belly.

In the fourth sentence, "He is smelling the fish," the verb "smelling" describes the action of someone (presumably a person) using their sense of smell to perceive the odor of the fish.

Overall, each sentence uses the verb "smell" correctly in its respective context.