In this paper, a new product of tensors is given, which is a generalization of the product of tensors introduced by Gelfand, Kapranov, Zelevinsky. This product satisfies the associative law. Using the associative law, it is concluded that the product of tensors given by Bu and others and the general product of tensors introduced by Shao can be represented by this new tensors product. As an application of this new tensors product and the associative law, the hyperdeterminant of the product of a kind of tensors is studied, i.e., some formulas for the hyperdeterminant of boundary formats product are shown.