23 Then the soldiers, when they had crucified Jesus, took his garments, and made four parts, to every soldier a part; and also his coat: now the coat was without seam, woven from the top throughout.
24 They said therefore among themselves, Let us not rend it, but cast lots for it, whose it shall be: that the scripture might be fulfilled, which saith, They parted my raiment among them, and for my vesture they did cast lots. These things therefore the soldiers did.
I think to cast lots means to throw a dice or something of similar effect where the soldiers are betting on each other to see who would win when the lots are cast and the prize would be the coat of Jesus. Jesus must have been wearing a very beautiful coat.