There are the three same branches and constitutionally a 'balance of power' with each branch having 'powers' with the other two branches having some oversight or 'veto' power.
Cabinet members/judges/Department heads (Secretary of Interior, Treasury, Defense etc)level civil servants are 'nominated' by the POTUS (executive branch) but must be approved by the Senate (legislative branch). Congress (Senate/House of Reps) passes legislation that must be signed off or vetoed by POTUS. The Supreme Court (judicial) is charged with determining the constitutionality of the actions of the other two branches. It is the ONLY branch over which the other two branches have very little control, although a judge/justice can be impeached.
In 'days past', SCOTUS justice nominations were expected to be nonpartisan and the Senate was expected to confirm/reject based purely on the qualifications of the candidate without regards to the candidate's political/religious leanings. But in actuality, the SCOTUS has been 'politicized' as far back as 1937 in one way or another. But it's just recently that it's been so blatantly done based purely on religious and/or 'social' issues (ie abortion, race, equality, sexual orientation). Trump was just the POTUS who decided to openly do this to pander to his base.