Humans always have intentions and plans. Some of those intentions are good, some are bad. But, what we need to be able to do is express our intentions and our plans. There are quite a few ways to express what you plan or intend to do and one of those ways is using the form -(으)려고 하다.
You can use the form -(으)려고 하다 to express what you plan or intend to do. However, when you use this form you also indicate you have yet to act upon it. So this form expresses you’re planning to do it, but still have to take action to realize it. You can also use the form in the past tense, -(으)려고 했다. However, you only use this form when you failed to make your intentions or plans did not go according to your expectations.
가: 방학에 뭐 할 거예요?
나: 한국에 여행을 가려고 해요.
A: What are you going to do during the vacation?
B: I plan to travel to Korea.
How To Use
Perhaps you have noticed, but the form -(으)려고 하다 is derived from the form -(으)려고. So it will come to no surprise it follows the same rules when it comes to conjugation. The basic rule it follows is the ‘batchim/no batchim’ rule. This means you use -려고 하다 when the verb stem ends in a vowel. However, when it does not, you use -(으)려고 하다. However, keep the ㄹ irregular verbs in mind, since its ㄹ will be treated as a vowel. And, don’t forget the other Korean irregular verbs.
You might think it will be difficult to keep -(으)려고 하다 and -(으)려고 separated. However, keep in mind that the second clause of the latter is typically verbose, while the former always contains a single word, 하다. So typically you cannot mix the two up.