The ball is immediately foul when, while on or over foul territory, it strikes any object foreign to the natural ground. That could be a bat, helmet, or if the ball is in flight a tree branch, electrical wire, or light pole. The same is not true if the batted ball strikes a foreign object over fair territory, such as a bat or helmet. In that situation the ball remains live. The fair-foul status of that ball is not determined until it is touched or settles. You will sometimes hear the expression “there are no foreign objects over fair territory” and this is to what that expression refers.