Sometimes when I get the hiccups I tell myself "I'm not a fish, I'm not a fish, I'm not a fish..."
And sometimes it works. Apparently it's an evolutionary leftover, and our brains telling us to use our gills - which last time I checked I didn't have in the first place!
As I understand it, hiccups are caused by the diaphragm falling out of sync with breathing. Therefore the idea is to 'reset' the diaphragm's activity so it fits in with your breathing again. That might be why some people suggest mild shocks from surprises, because it causes you to catch your breath.
My method works for me, but it's a little difficult to explain. When I sense a hiccup about to happen, I breath in quickly and deeply against it as it occurs and hold my breath for about five seconds or so. It normally works first time, but if it doesn't I do the process again. I don't remember it ever taking more than twice to work.
Only one thing that works for me, and that is holding my breath for an extended period of time. But I have a particular way/technique of holding my breath that I think is more effective than most people. Requires my full attention, so if it happens at a party (I often get hiccups when I've had too much to drink), I have to withdraw for a few minutes to get it sorted out.
It's also a precarious situation once I manage to stop it, because one single 'burp' and it's back in full force!