Purchase a flange pedal. They can be found online or at almost any guitar store that sells effects boxes. There are many different brands and models, and it's a good idea to ask a store attendant if you can test any model that you'd like to buy or, if purchasing online, to review video or audio demos of the pedal in action.
Insert a battery into the back of the flange stomp box or, if you purchased an electric flange pedal, plug it in. Test the box by stomping it on and off. Usually, an LED indicator tells you if the pedal is active.
Plug one end of a guitar cord into your guitar and the other into the input jack of the flange pedal you purchased. Plug one end of the other cord into the output jack of the flange pedal and into the input jack of your amplifier. Turn your amplifier on.
With your amplifier on a clean channel, strum a few open chords to get a sense of the flange's intensity in its current settings. Switch the amplifier to an overdrive setting to get an idea of how the pedal sounds in overdrive. Switch back to "Clean" to adjust the pedal settings.
Adjust the speed of the flange with the knob labeled "Rate" or "Speed," depending on the model you chose. This will change the speed of the swirl, from a slow spaceship-like swirl to a fast swirl that makes your guitar sound like it's underwater.
Adjust the depth of the effect with the knob labeled "Width" or "Depth." This will change the intensity of the effect, and the amount of sweep of the swirl sound, from producing a subtle wobble to large siren-like overtones.
Adjust the other knobs that the pedal offers, until you've dialed in the perfect swirly sound for your riffs. Beyond speed and depth, flange pedals diverge on the adjustable settings offered.