A letter of intent is a letter between two businesses, which provides the basis for a future or proposed agreement. This can also be drafted as an agreement between two businesses (heads of terms), rather than a letter. However the effect of these two documents is the same.
It can be used in any context to record negotiations and discussions, where the outline or detail of the terms of a future agreement have been agreed. It is not necessary for the negotiations to have been completed, they may be on-going.
Remember, however, that this letter is not a substitute for a contract. It is important that you sign a legally enforceable agreement before you start doing things under it.