My Experience
I work as a software developer for my day job, but I also work for myself making prototypes/products and other projects in my "off hours". Most times it's for myself, and sometimes for others. I do this as a side business, so people have a little more understanding of where I come from when I talk to them about their projects. I think most of their understanding is that I'm telling them about my business when they bring up an idea they want me to make for them, so the fact that I'm telling them I do things for pay "automatically" lets them know I have certain boundaries.
However, I have been approached by co-workers, friends, and family to make different things over the years. Usually they ask me if I have the capability to do something, with respect to what I already do, so again they seem to have the expectation that I'm not going to spend all my time and effort on their project. I also tend to state that I have other projects that I'm working on, but am willing to look at what they have in mind.
If they are a good friend of yours, you might not have to go as far as a Statement of Work, as baldPrussian mentioned, but setting expectations from the beginning is very important. I sounds as if this wasn't done initially on this project, so taking a step back and setting expectations in a SOW would be a good move right now.
As you get more experience in the workforce, you will come up against something called "scope creep" or "trying to hit a moving goal", repeatedly, which is what it sounds like you're butting into right now. Setting expectations will help mitigate that issue. With expectations set, you can sometimes reset your moving goal back to the agreed on initial expectation. The push back from this reset depends entirely on everyone's attitude. Sometimes you can make this easier to take if you state something like this:
I'm afraid that this/these new goal(s) go beyond what I was initially on board with accomplishing. I think we need to dial it back a bit. However, once we get the original set of goals complete, we can see about reaching this new set. We just need to get some things complete before we start pushing further.
That is to say, if you're good to go with the new set of goals.
Point of View: Switch
From your friend's viewpoint, you may seem like "the man", the person who can do anything, knows everything, and can be "whatever". Your friend might be realizing that they are in over their head and are asking you for help, even though it seems like they are demanding you to help. (At the same time, they may be hesitant to bring someone else in on the project, since that "new guy" is only doing what your friend said they themselves would be doing in the first place.)
They may simply be expecting you to have quick answers for their "impossible" or difficult questions. You've already agreed to help them in one respect, so why would you not agree to help them in other respects, right? You want this to work and not waste your programming efforts, right?
Well... yes and no to both. This is back to setting expectations. Do you want to or can you help them with the business side of things? Can you do this at the same time as your day job and building the app? The only right or wrong answer to these, and other questions, is if it works for you.
To push back on things you don't know or aren't willing to help with, you can passive-aggressively use the site https://lmgtfy.com/. This acronym stands for "let me Google that for you". Once you put in search terms, you can send them the generated link and it'll show them a condescending way to search for the thing they asked you about. It also allows them to do their search right from that page, so it's not completely wasted effort on your part. I wouldn't start with this approach first, though. Start with setting expectations, then if that doesn't work, simply do a search then send them the link to the search. If it's not clear to them that you are simply doing their work for them at that point, then the next step might be lmgtfy.com.