The sensor you linked states that it takes a power supply of 12-24V. The Raspberry Pi can only provide 5V, so you'll need to find another way to power the sensor. You can buy 12V or 24V power bricks pretty easily - you'll just need to solder one up to the leads of the sensor.
It seems like the sensor puts out an analog output (a voltage that varies between 0 and 5) depending on distance observed. Unfortunately, the Raspberry Pi has no analog inputs. Fortunately, you can buy an ADC (analog to digital converter) in order to add analog inputs to the Raspberry Pi. You can find a tutorial on how to use an ADC with the Raspberry Pi here, as well as a link to buy one.
However, the Raspberry Pi GPIO operate on 3.3V only. You'll need a way to turn the 5V signal into a 3.3V signal. You can do this with a resistive divider circuit. You can find a tutorial about it on Hackaday here - note that while the article talks mostly about digital signals, using a resistive divider will work just fine with the analog signal produced by the sensor.
In summary:
- Use a 12V to 24V power supply to power the sensor
- Use a resistive divider (aka voltage divider) to turn the 5V output of the sensor into a 3.3V signal
- Use an ADC chip to connect the sensor to the Raspberry Pi