In the simplest case where targets and obstacles are just points in your space, it's not that difficult to come up with good representations of attractive and repulsive forces.
For the sake of simplicity, let's stick to one-dimensional space and deal with massless points. Then, knowing the complete state of your robot in terms of position and velocity $\left(x,\dot{x}\right)$, together with the target $x_d$, the attractive acceleration $\ddot{x}$ is given by:
$$
\ddot{x} = K \cdot \left( x_d-x \right) - D \cdot \dot{x},
$$
where $K$ and $D$ are the stiffness and damping factors, respectively, responsible for generating the attractive force toward the target (stiffness) as well as a drag (damping) that suitably decelerates the robot avoiding oscillations around $x_d$.
Once you have $\ddot{x}$, you can integrate it twice in time to get the temporal evolution.
The extension to the 2D and 3D cases is pretty immediate, whereas to account for the repulsive force yielded by the obstacle $x_o$, you have to invert the sign of the term $K\cdot\left(x_o-x\right)$.