Part of your job as an ADC isn't necessarily to stay on the right target at all times. If that were true you would only ever be focusing on the enemy AP/ADCs, but that isn't always possible. The best way to focus during a fight is to focus on whoever you can hit. Putting yourself in a dangerous position for the sake of getting a few autos in on a squishy target might result in you being killed for it. If you're in a spot where you can hit a carry, go for it. But if they're protected by a line of tanks like they should be, stay behind your own and help your teammates pick off whoever they're engaging. An ADC doesn't have to call the shots, he just has to make sure the shots land on the right person at the right time. If an enemy Alistar is ulting into your team, back up and let your team handle his initial stampede while you whittle him down from a safe distance, making sure you stay mobile so enemies can't line anything up on you too easily. When the tank falls, move forwards.
As for staying on target in a mechanical sense, the easiest way I've found is to move perpendicular to your line of sight on them. this way you stay mobile, so people can't hit you as easily, but you maintain an even distance from whoever you're fighting. Ideally your team will lock down whoever you're shooting at so you don't have to try to stay on target, you can just move and fire when ready, but in a situation where everyone is moving everywhere just make sure you maintain your own distance while letting your team determine the flow of battle.
An ADC's job is to right click harder than anyone else on the map. Who you're doing it to doesn't matter as much as making sure you can do it longer than the enemy's ADC. So long as you're being smart with your positioning, and your team is being smart with who they focus, you'll still be putting out the kind of damage the team needs.