Links such as YouTube, PeerTube, Bandcamp etc will embed automatically in Mastodon posts, just include the link in the post and publish.
Links to GIFs will also embed, and including a link to a GIF is the easiest way to insert GIFs on here.
Embedding may take a few minutes to happen, so try refreshing the post later if it hasn't embedded straight away. Embeds may also look very different (or not work at all) depending on which server or app you are using to view a post.