The attorney wants to find out what the witness knows. He might ask what they saw, what time it happened and other stuff. He needs the information to decide whether the witness is good or whether it would be a waste of time to use the witness. If he called a witness to the stand and the witness didn't have any information, didn't see or hear anything - it would waste time in court.