I was one of the people who closed this. Both too broad and unclear would have worked here, and it probably panned out 3-2 too broad <-> unclear here.
There are several red flags here in this Q that make it both too broad and unclear:
Everything works fine but just need more understanding.
That says that OP wants a detailed explaination of what pointers are and why his code works, that's already too broad.
Question: What do I receive when I call the function? Is what I
receive a Pointer to the String and if so why is it const?
Yet OP says his code works. We don't even have the full code and the context in which he uses it (the name of the func getData sounds heavily like embedded hardware) so we really can't know either way if OP's code really is working fine or if it's just UB and happens to work for some reason.
Too broad would have probably been better for this.
Everything works fine but just need more understanding