How is the run time calculated in this insertion sort algorithm?
Let me answer step by step:

$c_1, c_2, c_4$ etc. are costs of the operation in the corresponding line. For example $c_1$ is the cost of for: one pass of this line costs $c_1$.
$key=A[j]$ happens $n-1$ times, because we start from $2$ and $n=A.\text{length}$.
As it is commented, its cost is $0$.