The new attempt will be different questions (or, if they are the same, that will just be chance).
That is certainly true in recent Moodle versions (I just checked the code to verify my memory), and I think it has always been like that.
For repeat attempts by the same student (when the first attempt has not been deleted) it depends on the setting "Each attempt builds on last". If that is on, subsequent attempts will use the same questions. If that is off, subsequent attempts will make sure they don't use questions that this student has already seen.