Let's say there are two aircraft in a risk of collision, one of them is equipped with Traffic Collision Avoidance System (TCAS) I so it will get only a Traffic Advisory (TA), however the second one is equipped with TCAS II, and it will get both TA and Resolution Advisory (RA). What is the procedure to be followed if there is a risk of collision, the TCAS II aircraft must follow the RA, and the TCAS I must follow the ATC instructions or what is the procedure in this case?
TCAS 1 will only give a Traffic Advisory (TA). The crew will lookout for the other aircraft and take evasive action if necessary. They also may contact ATC for instructions. They will follow ATC instructions unless they see that the instructions will bring them into the path of the other aircraft.
TCAS II will give a traffic advisory first, then a Resolution Advisory (RA). The crew has to follow the resolution advisory and inform ATC of their maneuvering (e.g. TCAS climb, Big Jet 123). They are trained not to follow ATC instructions that oppose the TCAS RA.
Note that TCAS II RA's are always in the vertical plane; TCAS II can not give instructions to turn.
According to AC 120-55C, the TCAS II aircraft will issue a TA (Traffic Advisory) and an RA (Resolution Advisory) if necessary and the pilot should follow any RA immediately and safely. The TCAS I aircraft should attempt to establish visual contact and maintain a safe distance from the other aircraft while following good operating procedures and ATC clearance. TCAS I only offers information about the traffic around the aircraft and does not give RA's. Meanwhile the TCAS II aircraft will see the TCAS I aircraft but will not expect the intruder to follow RA's or coordinate TCAS behavior, similar to if the TCAS I aircraft had only a mode C transponder or had TCAS II but with "TA only" active. See the table below for response details:
The behavior on the TCAS II aircraft is not all that different than if both were TCAS II equipped and the aircraft in question was the first to issue a Resolution Advisory (RA). The first aircraft will select an RA direction (up or down) that gives the most vertical separation from the intruder. The RA direction and strength for the first aircraft is calculated independently of the expected TCAS response of the intruder, except in a few exceptional cases.
You will not get coordinated behavior if one of aircraft is TCAS I equipped, but coordination only applies when the other aircraft has already issued an RA or an RA reversal is necessary. To give a brief description of coordination, normally the two TCAS II aircraft issue RA's at a slightly different time, and the first to declare an RA sends an "intent message" to the other to prevent it from issuing a contradictory RA. Coordination will also send a message during an RA reversal indicating that the other plane should follow the reversal. The exact details of coordination is beyond the scope of this question.
TCAS II and TCAS I will also have slightly different requirements for displaying a TA. For example, the logic was adjusted in TCAS II v7.0 to reduce thresholds for RVSM airspace. So the TA may be displayed on one plane when it is not displayed on the other.
It is important as well to remember the cardinal rules of TCAS: Always immediately and safely follow an RA (except in cases of stall or terrain), but do not deviate from ATC clearance and good operating procedures just to avoid a TA. The Uberlingen mid-air collision underscored the importance of following an RA and not ATC. The crash was caused by one plane following the RA and the other following conflicting ATC guidance. See AC 120-55C for more details on expected pilot response to TCAS.
TCAS logic is complicated when you get into the inner workings. I'd recommend reading the FAA's guide for more details. Most of this information comes from that booklet.