What does Acts 4:5 mean?
"Ruler" is a general term but Acts 4:23 identifies at least some of them as chief priests. "Elder" is from the Greek root word presbyteros from which we get our English terms Presbyterian and presbyter. In Jewish life, elders were leaders among the people, although that leadership could take different forms. Many were laymen who oversaw daily life and judged the disputes of the people. The Old Testament mentions the elders who judged by the gates of cities several times (Deuteronomy 25:7; Joshua 20:4; Ruth 4:11)."Teacher of the law" is another name for a scribe. Scribes were teaching lawyers and could be of any Jewish sect. Some were Pharisees and added extra regulations to the Mosaic law. Some were Sadducees and taught that the resurrection of the dead was impossible.
Together with the priests, the elders and scribes made up the Sanhedrin. The Sanhedrin, in Jerusalem, was the supreme Jewish court that presided over religious matters of any Jew, whether in Judea or beyond (Acts 8:1–3).
So it is that the Sanhedrin demands Peter and John explain themselves: why are they claiming the power they used to heal a lame man came from Jesus of Nazareth? The Sanhedrin believe Jesus is dead. Those who witnessed the miracle are amazed that the man can walk, and Peter and John haven't broken any laws. So the Sanhedrin lets them go with a warning to stop teaching about Jesus (Acts 4:16–22). Later, the Sanhedrin will arrest and flog all the apostles. The reason given is that the apostles continued to preach in Jesus' name after the council ordered them not to (Acts 5:27–28). The real reason is jealousy (Acts 5:17–18).