In general, the subject of a clause is the performer of the action described in the clause (the verb denotes an action, such as eat, run, and write) or the topic of the clause (if the main verb is stative/linking, such as am, seem, and look). Let’s look at some examples.
It is important to note that many other sentences may not fall under either of these two groups. For example,
In this case, “my neighbour” did not perform the action, nor does the verb talk about a state. The sentence talks about a condition the subject underwent. The first two categories, that is, as the performer of the action verb or what the topic of the sentence talks about, are the two more common generalizations of the definition of a subject. While we note that these may be overgeneralizations, this definition is handy for our objective.
The subject is the answer to the question “what + verb?” or “who + verb?” For example, consider the following sentence:
We have learned the general definition of a subject.
The answer to the question “Who has learned the general definition?” is “We” and is the subject of the sentence. Let’s see another example:
This definition is handy for our objective.
The subject of the sentence is the answer to the question “What is handy?” – “This definition”.
Rodney Huddleston and Geoffrey K. Pullum, A student’ s Introduction to English Grammar, Cambridge University Press. Read Section 2, The Subject, pp. 67–70, for an interesting discussion on this overgeneralization.