It can take a few games to really get it right, and people get mixed up by the restrictions each phase can have on movement.
For any type of move - Movement phase, run, charge, pile-in, retreat etc a unit must retain unit coherency, you can use that restriction to your advantage some times, especially to control pile-ins. If it can't, it can't move, and the only move it can make is a retreat
In the movement phase you can't get end a move closer to an enemy unit than 3" even with some of the teleport abilities that let you move with x" of a model, the overall rules still apply
In the charge phase, each model can move up to distance rolled - you don't have to declare what you're charging, in fact you can roll, then pick, and you only fail a charge if you can't reach anything. To complete a charge, you only need to get one model to withing 0.5" of an enemy unit
In the pile-in phase units that are within 3" of an enemy unit, models can pile-in up to 3" toward the NEAREST enemy model. That doesn't mean you need to reach it, or go in a straight line, just that you need to finish the move close than you already were. If you are already touching, then you can't move any closer, so can't pile-in, and that includes shuffling moving around a model.