A (baseband) pulse amplitude modulated (PAM) signal is given by
$$s(t)=\sum_{k}A_kp(t-kT)\tag{1}$$
where $A_k$ are the data symbols, $p(t)$ is the transmit pulse, and $1/T$ is the symbol rate. Note that $(1)$ describes a continuous-time signal. If you want to simulate a digital communication system, you need to use sampled versions of continuous-time functions, such as the transmit pulse $p(t)$. For this purpose, you need to define a sampling rate greater than the symbol rate. The ratio between the sampling frequency and the symbol rate is the oversampling factor.
Assume you choose a sampling rate an integer (oversampling) factor $m$ greater than the symbol rate:
$$\frac{1}{T_s}=\frac{m}{T}\tag{2}$$
From $(1)$, the sampled signal $s(nT_s)$ is then
$$\begin{align}s(nT_s)&=\sum_{k}A_kp(nT_s-kT)\\&=\sum_{k}A_kp\left(\left(n-k\frac{T}{T_s}\right)T_s\right)\\&=\sum_{k}A_kp((n-km)T_s)\end{align}\tag{3}$$
Or, in notation for discrete-time signals
$$s[n]=\sum_{k}A_kp[n-km]\tag{4}$$