it obviously depends on the laws of each country - in Italy, for example, if you happen to find underground an object of historical, artistic, or archeological value you have 24 hours to hand it to the authorities (cultural conservation institutions, municipal authorities or law enforcement). On the other hand, if you are using a metal detector you can't claim it's a random finding and you might incur in charges for abusive archaeological research. If the finding is indeed random you are entitled to a monetary prize by the state.
In other countries I would expect similar legislation