A US 25-cent coin, after the old Spanish coins that could be cut into eighths.
"Shave and a haircut, two bits."
"Put my two cents in" originates from the older "put my two bits in" and has its origin in the game of poker. When playing poker you have to make a small bet before the cards are dealt called an "ante" to begin play in that hand.
This phrase draws an analogy to the poker ante (two bits) and gains your entry into the conversation.
Two bits means one quarter (currently the American twenty five cent piece). This comes from the older term "piece of eight".
Today we have coins minted in different denominations - nickel, dime, and quarter in the U.S. - but this was not always so. Gold and silver coins once served as currency, with the value of the coin equal to the value of the gold or silver contained in the coin. To obtain currency valued at less than a full gold coin, coins would be scored and split into pieces. This is how one would make change so to speak.
Coins could be split into halfs, quarters, and eighths. One eighth of a coin was called a "piece of eight" and also called a "bit". Two pieces of eight is equal to one quarter. Hence "two bits" is a quarter.
Person 1: "....That is just my two cents"
Person 2: "You mean, 'My Two Bits' you moron... by misquoting the phrase, you illustrate just how stupid you are and your opinion should be disregarded."