The command you want to use can be found in the System Preferences, under Keyboard, then Shortcuts. It is titled "Move focus to active or next window". See my screen cap below:
By default, the keyboard combo is CONTROL-F4. If your function keys are working as media control keys, then you'd have to use CONTROL-fn-F4 to make that key work as a function key. You can change the default to whatever key combo you like, so long as it's not in use otherwise.
If you want to use a gesture on your trackpad, you are going to need 3rd party software to facilitate this. BetterTouchTool is pretty popular and will let you add and customize trackpad gestures to your liking. In your case, you'll need to set a new Global gesture, then assign a "Custom Keyboard Shortcut" to it, which would be CONTROL-F4 (unless you modify that in the keyboard prefs). In my example below, I chose to use Four Finger Swipe Up:
I had to disable that shortcut option in the Keyboard preferences first; set the shortcut in BTT; then re-enable it in Keyboard preferences. Before doing so, when I attempted to input the commands, it would instead switch windows on me. You may also need to disable all the trackpad gesture options in System Preferences and let BTT take over completely so they don't conflict.