Each sentence can be regarded as a logical statement. While the main parts of a sentence are the grammar subject and the grammar predicate the main parts of a statement are the logical subject (субъект) and the logical predicate (логический предикат).

If the logical subject corresponds to the grammar subject and the logical predicate corresponds to the grammar predicate, we deal with the relations of primary predication that is with a normal sentence.

This is always the case in the Russian language which does not know secondary predication.

When the logical subject does not correspond to the grammar subject and the logical predicate does not correspond to the grammar predicate we deal with secondary predication - that is the construction.

They walked in the park, with John smoking his pipe.
Они гуляли в парке; Джон курил трубку.

I saw him crossing the street.
Я видел, как он переходил улицу.