They should have explained this part better in the game.
But anyway, once you begin hacking it will go through a cycle of numbers, pay close attention to each of the coloms and you will notice that a number in a colom has stopped changing and is a fixed number, select it, thats 1 number done.
You merely have to select the numbers that stop randomising in the time limit.
Safe-cracking is also quite difficult, you will have to crack one in the third level so I'l give a brief explaination.
Once you enter the cracking screen you will be looking at around 4 or 5 circle discs each with a semi-circle cut out from its edge.
You then have to rotate the left stick to turn the discs, you turn them until they highlight green, they then lock and you will go onto the next discs.
It sounds very simple but its quite difficult since you will often turn the stick too fast and go past the Green zone (Its not colour coded its just what I call the unlocking spots) causing you to go around again and attempt to stop at the right place. You have an unlimited amount of tries for this safe though, so you can practice abit.