The Gemara in Pesachim (6A) tells us, "30 days before Pesach, we begin learning the halachos of Pesach." However, another Gemara in Megillah (32a) says we learn the halachos on Pesach itself, implying there's no obligation to know them before Pesach. So which one is it? Do we learn the halachos 30 days before or only on Pesach?
The Ran in Megillah (2a) explains that the only obligation is to learn the halachos on Pesach itself. However, the Gemara in Pesachim tells us that if someone wants to ask a question to a rabbi within 30 days, it is considered a valid question. This is relevant based on the Tosefta in Sanhedrin (7:5), which rules that if two people ask a question, we answer the person asking a valid question first.
So, according to Ran, the only obligation is to learn the halachos on Pesach itself, and if someone has something to ask, he may ask it within 30 days, as it's a valid question.
The Aruch HaShulchan (429:6) has a different approach: The Gemara in Pesachim is only speaking to the Torah scholars; they must study the laws 30 days before pesach, the common people only study the laws on Pesach, in line with the Gemara in Megillah.
However, most Rishonim and Acharonim don't follow the Ran and Aruch HaShulchan's approach.
Mishnah Berura (429:2) and Graz (429:3) both rule that everyone is obligated to learn the laws of Pesach 30 days before. The Biur Halacha (429) sources it from Rashi and Tosafos, amongst others.