Introduced by the Portuguese sailors who were stranded on a Japanese island in 1543.
The name of the island is tanegashima and the Japanese call all the primitive guns with this name.
A Japanese daimyo who saw the men using the matchlocks to hunt a duck was very impressed and purchased 2 of them. He immediately ordered to the blacksmith to make many copies.
It used to take about 1 minute to load the gun powder and fire. Oda Nobunaga had 2 groups of soldiers one fired while the other group loaded.
The samurai armors protected from the bullets. Most Japanese castles have loopholes to fire at the approaching enemy.
In the Edo period the guns were banned, only the yakuza had them.
The guns were heavily used in wars, mostly by footsoldiers (ashigaru).