See this answer for some insight into the nature of this isomorphism. Roughly speaking, the Lie algebra $\mathfrak{o}(3)$ can be viewed as the collection of all quaternions of the form $ ai+bj+ck,\quad a,b,c\in\mathbb{R} $ with the Lie bracket being half the commutator $ [q,r] = \frac{qr-rq}{2}. $ (The factor of $1/2$ is for normalization. Just the plain commutator works as well.) Given this description, the standard matrix representation for $\mathfrak{o}(3)$ can be obtained from the adjoint action of $\mathfrak{o}(3)$ on itself: $ i = \begin{bmatrix}0 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0\end{bmatrix}, \qquad j = \begin{bmatrix}0 & 0 & 1 \\ 0 & 0 & 0 \\ -1 & 0 & 0\end{bmatrix}, \qquad k = \begin{bmatrix}0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 0\end{bmatrix} $ Geometrically, $i$, $j$, and $k$ represent infinitesimal counterclockwise rotations about the $x$, $y$, and $z$ axes.
The Lie algebra $\mathfrak{o}(4)$ is isomorphic to $\mathfrak{o}(3)\times\mathfrak{o}(3)$. In particular, each element of $\mathfrak{o}(4)$ is an ordered pair $(q,r)$ of quaternions in the form given above. From this point of view, the action of $\mathfrak{o}(4)$ on $\mathbb{R}^4$ is defined by $ (q,r)\cdot v \,=\, qv + vr $ where the element $v\in\mathbb{R}^4$ is thought of as a quaternion. That is, $(q,0)$ acts as left-multiplication by $q$, while $(0,r)$ acts as right-multiplication by $r$. Using the basis $\{1,i,j,k\}$ for $\mathbb{R}^4$, one can obtain $4\times 4$ matrices for this action: $ (i,0) = \begin{bmatrix}0 & -1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0\end{bmatrix},\quad (j,0) = \begin{bmatrix}0 & 0 & -1 & 0 \\ 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0\end{bmatrix},\quad (k,0) = \begin{bmatrix}0 & 0 & 0 & -1 \\ 0 & 0 & -1 & 0 \\ 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0\end{bmatrix} $ and $ (0,i) = \begin{bmatrix}0 & -1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & -1 & 0\end{bmatrix},\quad (0,j) = \begin{bmatrix}0 & 0 & -1 & 0 \\ 0 & 0 & 0 & -1 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0\end{bmatrix},\quad (0,k) = \begin{bmatrix}0 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0 \\ 0 & -1 & 0 & 0 \\ 1 & 0 & 0 & 0\end{bmatrix} $