To start hacking another player, either bring up your phone and select multiplayer / hacking invasion or open the map and look for the purple hacking invasion marker and select it with X. The game spawns you in the other players world. They don't know you're there until you start hacking them, act in a strange way (hacking, reckless driving, shooting, ...) or if they try to start a mission (needs confirmation).
You'll have to reach the full 100% (complete hack). Partially done and escaping when spotted does not count.
And like in the first game, when the % increases, the circle shrinks. Plan ahead! If you hack them while in the middle of the road you gonna have a hard time, because the circle will cover just the road in the last bit.
And be aware: Unlike the first game, the hack starts immediately when you press LB! The circle then spawns around you, not the target. You can use cameras or drones to your advantage.
If the victim quits the game, the hack is counted as a win, but it is currently unknown if it unlocks the achievement.