I guess you start by breaking up the sentence into smaller chunks with the help of particles. Some of those chunks will be sentences in themselves, with their own set of particles inside them. So the trick for me has been to learn what particles to focus on first.
And I guess you need to keep an open mind about the context of the sentence, because the meaning might change at the end.
Here’s a longish sentence I just read from the book I’m reading now (「冒険者たち ガンバと15ひきの仲間」), with plenty of spoiler tags in case you want to read along :
ガンバは横になり、あごを入り口の岩にのせ、注意深く、しかし楽な姿勢で見はり、潮路はきちんとすわるようなかっこうで見はっています
(「潮路」 (しおじ) is the name of a character)
It helps that this has mostly already been broken into smaller pieces by the commas, but even so, there’s basically two sentences there:
[details=The main sentences]
The first one has parts as well:
[details=Parts in the first]* 「ガンバは」 Ganba is the topic
- 「横になり」 lying on his side
- 「あごを入り口の岩にのせ」 places his chin on the entrance rock
- 「注意深く」 attentively
- 「しかし楽な姿勢で」 but with an easy posture
- 「見はり」 looks out[/details]
So does the second
[details=Parts in the second]
- 「潮路は」 Shioji is the topic
- 「きちんとすわるようなかっこうで」 sitting neatly
- 「見はっています」 looks out[/details]
So putting it all together, it is something like
A clumsy translation of the whole thing
> Ganba lied on his side, rested his chin on the rock at the entrance and started keeping watch attentively but with an easy posture, while Shioji did the same neatly sitting down
As obvious as it sounds, I feel the trick is to recognise what parts to break down first, and how to put them back together in a way that makes sense. And that you only get to by reading.
At first, I had to translate everything as I went along. But the more you read, the more the meaning starts to take form in your head as-is, which is I guess a Good Thing ™. I guess that partly explains why my translation of this sentence in particular feels so clumsy.