Step 1: Understand the question.
We must find which section of the Code of Criminal Procedure, 1973 says a person arrested without a warrant must be produced before a Magistrate within 24 hours.
Step 2: Recall the constitutional base.
Article 22(2) of the Constitution says every arrested person must be produced before the nearest Magistrate within 24 hours of arrest. This stops illegal detention.
Step 3: Find the matching CrPC section.
Section 57 of the CrPC puts this guarantee into the procedure. It says a police officer cannot keep an arrested person for more than 24 hours without a Magistrate's order. The travel time to the court is excluded from the 24 hours.
Step 4: See the purpose.
The rule protects personal liberty, prevents custodial abuse, and brings police action under judicial supervision.
Step 5: Check the other options.
Section 41 is about when police may arrest without a warrant. Section 51 is about searching an arrested person. Section 164 is about recording confessions and statements before a Magistrate. None of these is the 24-hour rule.
Step 6: Reach the answer.
The 24-hour production rule is in Section 57 of the CrPC.
\[ \boxed{\text{Section 57}} \]