Originally, Israel did not have a temple. Instead, they had a tent (called the tabernacle in some versions of the Bible) which was the centre of their worship and the place where God was said to dwell (Exodus 25:8-9). King David wanted to build a temple but God said that his son Solomon would build it instead (1 Chronicles 17:4,11-12).
Solomon’s temple was begun in 966 BC (1 Kings 6:1) and was used for nearly 400 years until it was destroyed by Nebuchadnezzar’s army in 586 BC (2 Kings 25:1-12). Hezekiah used this temple as he was king from about 729 BC to 686 BC.
When the Jews returned from captivity, they built a new temple under the leadership of Zerubbabel and Jeshua (Ezra 3:8-11) starting in 536 BC and finishing in 520 BC (Ezra 6:15). This temple was on the same site as Solomon’s temple and was in use until about 20 BC.
After he came to power, King Herod wanted to build a magnificent temple in Jerusalem, partly to win the favour of his Jewish subjects. He initiated the building in about 20BC. This was built on the same site as the previous two temples, but was much larger, with enormous open paved areas known as the temple courts.
The temple mentioned in the gospels and Acts (e.g., John 2:14-17; Mark 15:38; Acts 2:46; etc) is Herod’s temple. It was destroyed in AD 70 by the Romans.
Dates taken from The Times: a Chronology of the Bible.