Your starting point for how to think about this should be the same as with any social interaction: empathize. Put yourself in their shoes. Start by trying to imagine what their motivations might be and what they might get out of spending 30 minutes with you answering your questions. Many social interactions involve some kind of exchange; what is exchanged might vary (it might be information, or emotional support, or entertainment, or a sense of connection, or any of a number of other motivations), but try to understand what the professor might get out of it, and then tailor your approach accordingly. What value can you offer? What's the benefit to them?
Realistically, in many cases, there might be nothing you have to offer that would make it worthwhile for the professor to spend 30 minutes of their limited time answering your questions. Professors are often busy and have many responsibilities and obligations of their own, and so they simply might not be available to be a free resource for you, as much as you wish it were so. In this sense, professors are much like any other domain expert. For instance, if you needed advice from a legal expert (a lawyer), what could you offer them to make it worth their while to spend 30 minutes of their time answering your legal questions for free? Usually, you can't. Instead, you have to hire their services.
Now in some cases you might get lucky and be able to find an expert who knows the subject area and is willing to give you free advice. The motivation might vary, but here are some samples of why someone might be willing to help you out like this:
Maybe the professor/expert gets some satisfaction out of seeing their ideas used in practice, as well as some boost to their professional reputation. (This might be applicable if you're going to build a widely deployed product, and the professor's research provides specialized knowledge that will improve the product, but it probably won't be if you're an amateur who is tooling about with this stuff for curiosity's sake.)
Maybe the professor/expert gets some satisfaction out of serving the public. (This might be more applicable if you work for a non-profit that is working to serve the public, or if answering your question will help not only you but others -- such as if the answer is documented on a public site like StackExchange.)
Maybe the professor/expert is doing a favor for someone else they know, who they owe a favor or want to oblige. (This might be applicable if you know someone who has a strong relationship with the expert and who is willing to ask a favor and whom the expert might want to oblige.)
So, if you're asking for free advice from the professor, start by knowing which of those motivations you might fit into, and tailor your approach closely.
But realize that most professors/experts will likely be too busy to give you this much of their time for free, if they're not getting anything out of it. You're not entitled to any of their time; if they give you any time, you should be grateful for it and consider yourself fortunate. So your traditional options are:
Hire the professor/expert as a consultant.
Read the professor's published papers. Read the research literature in the area. Study the field as much as possible. If you've spent weeks or months doing so, then typically you'll get a good idea of the answers to many of your questions -- and if there are one or two that remain unanswered, you might be able to frame an email that asks a well-crafted, focused, non-trivial question about their research. When you've put in a ton of effort on your own and are able to ask a narrowly-focused intelligent question about the professor's research, and you're not wasting their time, it's more likely you'll get an answer. But in this model, you're not asking for 30 minutes of their time. You're sending an email with a single, well-crafted question.