A miracle is a manifestation of supernatural (spirit-based) power that has an effect and purpose in the physical universe. Most of these events are initiated by God and either directly manifested by him or through those he uses such as righteous angels or converted humans.
The devil and his demons, however, using powers they retain from before they rebelled, can also perform certain types of miracles (Exodus 7:10 - 22, 8:6 - 7, Matthew 24:24, Revelation 13:13 - 14, 19:20).
Miraculous Words
In the Old Testament, the two main English words used to delineate a miracle are "sign" (Strong's Concordance #H226) and "wonder" (#H4159). The phrase "signs and wonders" or its rough equivalent is recorded in 19 King James Old Testament verses.
There are four Greek words utilized in the New Testament to designate or describe miracles. The Greek semeion (Strong's #G4592), which is sometimes translated as "sign," (Matthew 12:38 - 39, 16:1) is used to validate a divine commission, to attest to a message from God or bear witness of His presence. Terata (#G5059), translated as "wonder" in some Bibles in verses such as Acts 2:19, denotes events or miracles that are astonishing for humans to see.
The third word used for miraculous events is dunamis (#G1411) which means force or power. It references occurrences that are clearly caused by someone possessing superhuman power that is supernatural in origin (Romans 15:19, 2Thessalonians 2:9). The last word used is ergon (#G2041). It is often translated as "works" and used to discuss the deeds of Christ (Matthew 11:2, John 5:20, 26, 7:3, 10:38, etc.).
Purpose
The purpose of miracles is based entirely on their source. God initiates them for a variety of righteous goals, such as revealing something about his character, power, plans or will. They can also confirm that a person or angel is inspired by the Eternal in their role as teacher, prophet, judge, messenger and so on. Jesus' many mighty works showed he was the Son of God and prophesied Savior of the world.
The devil and his demons, however, carry out miraculous acts for the purpose of deceiving humans and turning them away from a relationship with their Creator. As enemies of righteousness who hate the Eternal and the humans he made, they also exercise their power to bring as much trials, troubles, and suffering to humanity as they can.
Three Periods of Mighty Works
God's performance of miracles, through individuals, can be lumped into three general Biblical periods. The first of these involve his use of Moses and Aaron to free the children of Israel from Egyptian bondage. The Israelites permanently left Egypt for the Promised Land in 1445 B.C.
The second period revolves around the ministries of Elijah and Elisha. It began during the days of King Ahab who reigned from 874 to 853 B.C. (1Kings 17:1) and continued to King Jehoash's rule from 798 to 782 (2Kings 13:14 - 19). God carried out, at times, unusual miracles through these two prophets when worshipping him was under threat in the Kingdom of Israel.
The third and last period of miracles takes place in New Testament times starting with the ministry of Jesus in 26 A.D. and ending with the death of the apostles (including Paul).