How to make low pass filter using frequency sampling method?
The article is assuming that you already somewhat understand sampling.  As soon as you sample a signal, you need to express all of the frequencies with respect to the sampling rate (or you have to carry the sampling rate inside all of your calculations, which is both tedious and loses some generality).

For discrete-time Fourier transform the definition of the Fourier transform is that you do the integration from $-\pi$ to $\pi$.  The way you integrate a function that's defined as the second one is from calculus class: do the integration only over the non-zero parts of $H_d(\omega)$:

$$h_d(n) = \int_{-\omega_c}^{\omega_c} e^{j n \omega} d\omega$$

You'll find that the result has an infinitely long response, which is a bit awkward for fitting into our real, finite world.  A lot of practical DSP design is doing things like finding an acceptable tradeoff between filter length and how close it comes to what you want.

In your case, you want to cut off at $1000\mathrm{Hz}$ in real-world units, which means you need to scale your cutoff frequency by the sampling rate, so that $\omega_c$ is in radians/sample.  I.e., $\omega_c = \frac{1000\mathrm{Hz}}{F_s}$, where $F_s$ is your sampling rate.