I'm personally only familiar with doing this in Beamer, which uses the multimedia
package, distributed as part of Beamer itself. (Although it can be used in normal documents as well, independently from the rest of Beamer) The canonical reference on how to use the multimedia
package is the Beamer user's guide, section 14.1, but basically it boils down to using the command
\movie[options]{placeholder box}{movie filename}
The placeholder box is some text or other content (could be an image, for example) that determines the size at which the multimedia file is shown.
The multimedia file can be shown either with an external viewer application, which launches when you click on the appropriate part of the PDF file, or directly in the PDF viewer itself. In both cases, though, this functionality is only supported by certain PDF viewers, mostly Adobe Reader. The file types it is able to display depend on the capabilities of the PDF viewer, or if using an external viewer, on which viewer program is being used.
A quick search on CTAN turns up a possible alternative, media9
(which supersedes the old movie15
package). According to the documentation, its main command is
\includemedia[options]{alt content}{media file}
and it seems to offer some of the same main features as Beamer's multimedia
. However, I've never used this one myself so I can't say anything about it that isn't mentioned in the package documentation.