U.S. Magistrate Judge Sheri Pym in Riverside directed Apple on Tuesday to help the FBI get around the phone's passcode protection and any auto-erase functions the device might employ.
In a statement, Cook said that such a move would undermine encryption by creating a backdoor that could potentially be used in the future on devices.
Here's a breakdown from The Times reporting:
How big a problem is encrypted technology?
In general, prosecutors and intelligence officials say current technologies can make it impossible to examine suspects' communications even if police have a court order.
Law enforcement officials note that some tech companies have boasted to customers that when their technologies are used, nobody can gain access to their messages ever, including the government.
The Manhattan district attorney's office said in a report issued in November that it was unable to execute 111 search warrants for smartphones over the last year because they were running on encrypted technology offered through Apple's iOS 8 operating system.
Several cellphone models, including Apple's iPhone 6 and Samsung's Galaxy S6, use advanced encryption algorithms that scramble all the data on the device when a pin code is set.
Encrypted cellphones and text-messaging apps have made it harder for investigators and intelligence services to track suspected plots in real time, or trace locations and connections once they acquire a suspect's device, the FBI has said.
Apple changed the way it manages phone encryption in September 2014, a move that makes it more difficult for law enforcement to access encrypted data on cellphones, according to Clifford Neuman, director of USC's Center for Computer System Security. Previously, forensic investigators could tap into a device's hardware port and gain access to a phone's data "independent of needing to try passcodes," he said.
"That path into the device is no longer possible," Neuman said.
The change in the encryption method means Apple may not be able to decrypt the data, according to Neuman. The company could, however, bypass the access code system that would cause the data to be erased, and then grant the FBI access to the encrypted data. Federal investigators would then have to decrypt the data themselves, Neuman said.
Is the federal government pressuring Silicon Valley?
In the wake of San Bernardino, President Obama addressed the nation in urging high-tech and law enforcement leaders "to make it harder for terrorists to use technology to escape from justice."
Although the tech industry says it wants to help, it's reluctant to give away private information and data to government agencies, arguing that doing so fosters user distrust and raises the risk of hacker attacks.
What has the government been trying to do?
In January, federal officials announced the creation of a task force to help prevent extremist groups from using social media to radicalize and mobilize recruits.
The interagency group will be led by the Homeland Security and Justice departments, but will include staff from the FBI, the National Counterterrorism Center and other federal law enforcement and intelligence agencies.
In addition, the State Department will establish a unit called the Global Engagement Center to work with allies to deter terrorists from carrying out attacks overseas.
Why goes the government want to unlock the phone?
Authorities are trying to determine the couple's movements between the time of the attack at the Inland Regional Center the morning of Dec. 2 and their deaths in a wild firefight with police hours later. Last month, the FBI asked for the public's help in filling in an 18-minute gap in the narrative of the couple's whereabouts.
The FBI is also probing whether the couple received any help in plotting or carrying out the attacks.
How did this get to court?
The device, an iPhone5, was given to Syed Rizwan Farook by the San Bernardino County Health Department and was used in his job as an inspector, according to the motion.
It is the tech giant's policy to require law enforcement to obtain search warrants or subpoenas before aiding in investigations.
But the company sees the order as an "overreach by the U.S. government," according to the statement.
The health department gave the FBI consent to search the phone, according to the motion, but authorities have been unable to bypass the phone's passcode lock for fear its operating system would destroy all data on the phone after 10 failed attempts.
Does this battle go beyond cellphones?
Yes, terrorism spreading through social media has also been a major issue.
Sen. Dianne Feinstein (D-Calif.) has led a push in Congress for legislation that would require social media companies to root out and report suspicious activity. Tech firms and privacy advocates beat back an effort by Feinstein earlier last year.