You simply animate a layer's rotation to mimic the swing and then time it to create the illusion of an impact. Create a pre-comp, build yourself some pendulum, use the pre-comp in teh main com. Adjust the anchor point, create a few keyframes. Done.
Perhaps a bit more explanation: Swinging a pillow is a simple application of the most basic positional and rotational information by using keyframes. Mimicing realworld physics and ballistics takes a bit of working knowledge and experience with After Effects and keyframe interpolation settings.
After Effects is an esoteric package with its own jargon and procedures.