(7) Her dog chases rabbits.
For example, her dog and rabbits in (7) are both noun phrases, but they have different functions in the sentence. Although we haven't yet specified these functional roles, we can already see that each noun phrase has a different role in the sentence. The dog is doing the chasing, and the rabbits are being chased. The role of her dog is probably already familiar to you: it serves as the subject of this sentence. Rabbits plays a role known as the direct object, which we will study in the next chapter.
(8a) His happiness was evident.
(8b) That he was happy was evident.
Although subjects are typically noun phrases, they need not be. The underlined constituents in (8a) and (8b) are both subjects, but these two subjects are realized by different forms. The first is a noun phrase while the second is a clause (another term we're about to get to). In other words, just as the same form can serve different functions, the same function can have different forms.
(9) Shelly wrote a short story.
(10) The baseball player underwent elbow surgery.
If we consider constituents that are underlined in (9) and (10) above, we can see that they both have the same form (NP) and that they are both subjects, but in another way their functions are different. Shelly in (9) plays the role of the actor; she performs an action. The baseball player, however, is not the actor in (10); the surgery is performed upon him. He plays the role of the experiencer, commonly called the patient. (That's the general term, and not just because this particular sentence is about a medical procedure.)
Notice that in discussing these roles, we are invoking the meaning of the sentence. They are, in other words, semantic roles, and they are not the same thing as grammatical roles like subject and direct object. Grammatical roles are defined by structural relationships within the sentence, semantic roles by relationships of meaning.
Keep in mind these distinctions. The form of a constituent, its grammatical function, and its semantic function, do not exist in one-to-one relationships. We will see many instances as we proceed where there are prototypical relationships. For example, subjects prototypically are NPs and actors. But as soon as you start to generalize and assume, for example, that subjects are always actors, you will get into trouble. You will save yourself a great deal of confusion if you distinguish form, grammatical function and semantic function carefully. As we proceed, take note of when we are discussing form and when we are discussing function.