Of the two sentences “how the data is accessed” and “how is the data accessed”, which one is correct?
That depends. Either could be correct, given the right context.
Do you know how the data is accessed?
How the data is accessed will be of great concern to us. We can't afford to waste CPU cycles.
How is the data accessed? Can you tell me?
The first is a statement, the second is a question.
edit: IF you added a question mark - (?)!