In the English grammar, subject is most often a noun or pronoun that performs an action.
For example, in the sentence: Students study English, the noun students is the subject of the sentence.
In the sentence: She sings the song, the pronoun she is the subject of the sentence.
The gerund can act as the subject:
The infinitive also can act as the subject:
Who to go with is a difficult question.