You Identify both components then research, like if its a graphics card and motherboard you would first find the mobo or card on the net, lets go with the mobo first, we 'know' its an AsRock m3a770de so we go to newegg or some site that sells them, and read the graphics part of the specs sheet, it staes theres a pciex16 lane for graphics, so we know the card required will have to be a pcie card, not an agp card,
or we go to the graphics card, Sapphire 5770, specs tell us its a pcie graphics card, so you then look at the mobo and check it has a x16 pcie lane
again, what is it you are actually trying to achieve here? we could probably help

Moto