I was watching a review of that movie The Last Samurai and the commentator said that the idea that the samurai didn't use gunpowder because they were "dishonorable" was a lie.
So how was it used? Did the average soldier use gunpowder? What did they use and do we know what their general strategies for fighting with it was during that time?
The introduction of the arquebus by the Portuguese kind of sparked an arms race in who could acquire more guns because everyone recognized their superiority. Prior to its maximum diffusion, commanders seem to have used posted guns in specific locations where they know would be critical (at least Nobunaga did at Nagashino, though I'm quite sure all commanders did). Take a look here at some army composition data, which include guns, and the trend of guns replacing some yari but most bows is readily visible.
If Edo era military instruction manuals are applicable to the very late Sengoku (and it might not be), then gunners are used in (to borrow modern terminology) 2 or 3 sections of 5 teams (according to Naganuma Tansai) or 4 teams (according to Hōjō Ujinaga) of 5 gunners or a mix of 2~4 gunners per 1 archers. They are to be placed in the front of the formation by section and team with mounted officers and their shooting begins the fight. Naganuma Tansai names several ways the squads are to fire their weapons, but do not describe what they actually are. But we can safely say they are the first "line" and they skirmish before the rest of the formation goes into close quarter fighting. They play important roles in both assault and defense of fortification, seeing Naganuma goes into slightly more detail in describing what gunners are to do. And we also know that from narrative history of combat.
Cannons on the other hand were mainly breech-loading swivel cannons for either castle defense or sometimes naval use. Their use in field battles did happen but seem to have been rare.
Personally I would say gunpowder weaponry gave soldiers a new, very important weapon to play with, and likely caused some tactical changes, seeing it caused composition changes. But as everyone was quick to get more and more guns, it probably didn't change the overall strategic outlook for anyone.