Firstly, the way that the president may be able to check and balance the powers of the courts, is by being able to choose a justifiable person to be a judge, typically either based on quality, but also on having the same ideology. This occurs when there is a vacancy created in the court, typically either through death, a judge stepping down, or any other reason.
Congress, on the other hand may impeach members of the judicial branch, control the amount of justices on the supreme court, and approve/disapprove of the president's nominee to the justice system.