If the rattling sound comes from the disc brake , usually your car front brake consist of disc brake, the two possible loose parts that causes rattling sound is either your disc brake caliper mounting bolt or the anti-rattling springs. If you might not know the anti-rattle springs is the one that secures your car disc brake pads to keep it from rattling like wise the caliper mounting bolts keep the caliper secure to the support bracket.
Hence, if the sound comes from the drum brakes, which is usually your car rear brakes, the two possible loose parts that causes the rattle is either the retaining springs or the return springs, where in the retaining springs is the one that keep your car brake shoes to a proper position, where as the return springs is the one that pulls your car brake shoes back after your car brake is release.
You might be aware that your car brakes is consisting of different parts thus the possibility of looseness can occur on those parts but the above mentioned parts are the most likely that causes the rattling sound loud enough to notice.
To correct the problem you’ll need to bring your car to a reputable shop and have the mechanic to remove the tire where the rattling sound occur and inspect your car brakes.