Subject are predicate are the two parts of a sentence.
The students are waiting in the class.
«»«»«»«»«»    «»«»«»«»«»«»«»«»«»
    Subject                 Predicate
A subject is a person, animal or a thing that is doing the action or is the focus of the sentence. The sentence revolves around the subject; it tells what the sentence is about. It is usually a noun or a word that takes the place of a noun.
A predicate is the part of the sentence that contains the action that the subject does. It usually includes the verb, object/adjective/adverbs (if any).
Let us see a few pictorial examples:
sp teacher.png
is teaching English.
sp teaching.png
Mr.Balu is teaching English.
The baby
is sleeping peacefully.
baby sleeping.jpg
The baby is sleeping peacefully.
Note that always the predicate explains what the subject is doing. The subject and predicate should always pair up perfectly; Otherwise, the sentence will not make sense.
In the above pictures, if we alternate the subject and predicate, it will read as:
The baby is teaching English.
Mr. Balu is sleeping peacefully.
Both the sentences do not make sense if we refer to the images.