There are many knots that can be used to ensure you have a secure connection when joining rope to objects. With magnet fishing, the most important thing that must be kept secure is the magnet itself.
One of the most popular, and often referred to as the best knot to use in magnet fishing is the Palomar knot, it is a relatively easy knot to learn and is also a very secure knot.