Random Questions may be added to any category. When you add a Random Question to a quiz, it will be replaced with a randomly-chosen question from the same category. This happens for each attempt so students are likely to get a different selection of questions when they attempt the quiz. When a quiz allows multiple attempts for each student, each attempt is likely to contain a new selection of questions.
The same question will never appear twice in an attempt. If you include several Random Questions then different questions will always be chosen for each of them. If you mix Random Questions with non-random questions, the random questions will be chosen so that they do not duplicate one of the non-random questions. You need to provide a sufficient number of questions in the category from which the random questions are chosen, otherwise the student will be shown a friendly error message. The more questions you provide, the more likely it will be that students get different questions on each attempt.
The grade for the randomly chosen question will be rescaled so that the maximum grade is what you have chosen as the grade for the Random Question.