If L and M are not part of a larger field F, we can create a compositum as follows. Let T be the tensor product of L and M, as K algebras. Note that the elements of L and M are units in T. Mod out by any maximal ideal and call the image E. Of course E is a field. Since units map to units, E contains a copy of L and of M. The elements in L times the elements in M generate all of T, hence they generate all of E. There is no smaller subfield of E containing L and M. Therefore E is a compositum.
Addition and multiplication in E are inherited from T. Mod out by a different maximal ideal, and find another compositum of L and M. Still, addition and multiplication agree with T, hence the two compositums are isomorphic as rings, and as fields.
Let F be any other compositum. A bilinear map, namely multiplication, carries L cross M into F. since T is universal, find a compatible map h(T) into F. Since F is a field, h carreis a maximal ideal to 0. In other words, any given compositum F is T mod a maximal ideal. These are all isomorphic, hence the compositum of L and M is unique up to isomorphism.
Assume L/K is the finite extension. The dimension of L+M, as an M vector space, equals the dimension of L over K. View the tensor product T and the compositum E as M vector spaces. Both have the same dimension; in fact both have the same finite basis, the basis of L over K. Now E is a quotient ring of T, and E is a quotient M vector space of T. The kernel has to be zero, whence T = E. In other words, L+M = L×M.
Conversely, assume the extensions are disjoint, and L/K is finite, and L×M = L+M. The dimension of L+M, as an M vector space, is the dimension of L×M, which is the dimension of L over K, hence L and M are linearly disjoint.