You are referring to two different protocols.
The second source is linked to the DSA (Digital Signature algorithm). This uses modular exponentiation in a group of prime order over the integers.
The first one is a version of the DSA over Elliptic curves, namely ECDSA (Elliptic Curve Digital Signature Algorithm).
They basically work the same. You have a group, with a defined operation, and you work on elements of this group with scalars. The difference between classical DSA and ECDSA is that the first one has multiplication as a group law (hence $g \times g \times \ldots \times g = g^k$ where k is the number of multiplications) whereas the second one has addition law (for a point $P$ of the curve, $P+P+\ldots+P = kP$)