Both subtitles and captions are texts onscreen.
Subtitles scroll naturally following the narration or voice-over on the bottom of the video. They are a flow of translated texts that not only should come out with specific fonts and sizes, but also correctly positioned on the bottom of the screen in the so-called safe zone. Subtitles are used on TV shows, movies and any kind of video presentation.
Captioning or close captioning, cc, is used to help deaf and hearing-impaired people. They not only translate what is being said, but also describe different sounds. Captioning also refers to the titles, lower-thirds and other onscreen texts with non-standard fonts and sizes. Usually animated texts on graphics.