First, make sure your rattata knows iron tail. Then, get a druddigon and breed it. Then, if the egg hatches to be a druddigon(which almost everyone knows how to do) it'll know iron tail.
Hope this helps:)