Your advisor is the first source of help. A good one will provide it, but sometimes by sending you off to read something. For many students (myself included) the idea for a research topic comes from the advisor. Regular meetings with them are also advised and you should mention where you are stuck when it happens. You might get an answer. You might get a hint. You might get sent to another source. All are helpful.
Whether advisors are co-authors or not (my preference is not) is field dependent. In math it seems pretty rare, for example, and in the past was mostly non-existent.
As for paying people to do some technical things, that may be allowed or not, but the advisor is the one to ask in your particular case. But other kinds of consultations are normally allowed and mostly don't rise to the level of co-authorship. It is possible, of course, but that might also put the degree itself in jeopardy when the rules are strict. Some fields are funny that way. A brief conversation in math can provide the crux of the answer to the key problem of a "thesis".
I once heard the joke (I hope) that an advisor, speaking to a student, said "I don't mind writing your dissertation, but I'll be damned if I'll explain it to you when I'm done."