I have always wondered. Do people keep the balls? What happens?
The depends on the host club!
The host club will decide as owners, whether fans are allowed to take the balls. At most clubs, the balls are thrown back to the security guards by the fans automatically. If one is not returned voluntarily, the guards get him. It is uncommon in football to take balls home with you. Finally they cost about 100 euros. Source
In football, if the ball crosses the field boundary then it is considered a throw or free-kick (unless it is a penalty as judged by the referee). It is derived from rules of all major leagues. The rules of football is applicable to the field i.e. it does not consider the crowd as part of the rule; throwing the ball at the crowd is considered the same as the ball crossing the field boundary. The ball is to be returned to the field for the play to continue. In case the ball is not found, it is considered lost and a replacement is brought in. In case the ball is damaged, a replacement is brought in.