When you’re on the coattails of someone else, you’re enjoying success because of the association. Often, the success is not earned.
An old-fashioned type of jacket has coattails that extend to the ground. If someone sat on your coattails, you could drag them around, giving them a ride. That’s why this expression refers to situations where one person gets a free ride from another. If a father gives his son a job, the son might be accused of riding his dad’s coattails. This suggests the son doesn’t deserve the job: he only has it because of the family connection.