Photo 1: I used a collectible hand carved duck and glued it to a magnet for a neat unique tie tack. (Of course it is now no longer a collectible but it is a better use than having it sit on a shelf.)
Photo 2: Use hot glue or epoxy to glue magnet to object.
Photo 3: two magnets under the shirt and one on the tie. Bigger or more magnets mean stronger holding power but these are pretty strong.
Photo 4: Here I just use a naked magnet for the tie tack. You can also attach some magnet object to the tie magnet as well. I like to use steel foreign coins.