If your horse is registered , ie AQHA, APHA, etc. , simply do a pedigree search on that site either by using the horse's registered name or the registration number.
When you buy a register horse papers comes with the horse with the breeding background. Also you can contact the breed for example quarter horse contact the amercian quarter association for the breeding background. Once a horse is registered they have all the background for the breeding lines. And they have to have this to be registered.
If your horse has registration papers you can look up each individual horse online. If your horse doesn't have registration papers you will probably need to call the person you bought it from and ask if they know what the horses bloodlines are. You may have to keep calling until you get the original owner.