SubStation Alpha

SubStation Alpha (or Sub Station Alpha), abbreviated SSA, is a subtitle file format created by CS Low (also known as Kotus) that allows for more advanced subtitles than the conventional SRT and similar formats. It is also the name of the popular, now discontinued tool used to edit subtitles.
This subtitle format is frequently used in anime fansubs, either to overlay subtitles onto video while it is being encoded (hardsubbing), or to store subtitle data alongside video data, often in a Matroska (MKV) container (softsubbing). It's not commonly used professionally except for Crunchyroll.
The current version of SSA is v4.08. There are many freeware and open source subtitling applications that support the SSA format.
Principal sections in an SSA subtitle.
A basic SSA subtitle:
Advanced SubStation Alpha.
Advanced SubStation Alpha (ASS) is a script for more advanced subtitles than SSA. It is technically SSA v4+. It is able to produce anything from simple texts to manual graphic editing used in karaoke. There are few programs designed to create these scripts.
The main feature of ASS is it has more specifications than normal SSA, like in styles programming.
For example, the above script changed into ASS:
Software support.
Subtitle encoding software.
Software tools to encode subtitle files into video containers (mkv, mp4, mov, ...):