Getting Combinations Of A Product

What is the easy way of getting combinations of a product with its product codes? Is there a core function?

What do you mean by "getting combinations" ?