How does the progress calculation of Jira issues and epics works?

How does the progress calculation of Jira issues and epics works?