There are multiple ways to install a cadence sensor, but the key is to make sure it is going around in a big circle while you're pedaling. The manufacturer may include a variety of options.
This sensor uses an accelerometer so you don't need a magnet or other external sensor, its a self-contained blob!
I used the included double side adhesive to install it under one of my bike's foot pedals. It took just a minute and works great!