Courts and judges are required to be impartial – they cannot be “friends” with the litigants before them. But sometimes the court can really use a friend.
An amicus curiae is literally a “friend of the court” – a person or entity which is not a party to the case but who offers information or legal advocacy bearing on a case to assist the court in reaching a just decision. Amicus curiae participants are not aligned with either party but typically have an interest in the issue to be decided. For example, the American Civil Liberties Union, which advocates for the protection of free speech rights (among others) might seek to present an amicus curiae brief and argument in a case dealing with governmental limitations on political gatherings and rallies. Planned Parenthood might seek to provide amicus input in a case involving abortion rights. Trade groups sometimes provide amicus assistance in cases involving regulation of their particular industry.
Amicus curiae status is not automatic – it is within the court’s discretion to allow or disallow it. (After all, you can choose your friends. . .)