The simplest approach is to use something that already exists. Open the Free Models library, search for what you want, and insert it directly into your place — that covers most needs without writing anything.
If you'd rather build it yourself, you'll be working in Luau, Roblox's scripting language, inside the Script editor. A basic weapon like an AK-47 is a reasonable first project: create a Tool object, then attach a Script that handles input and damage.
Either way, the Roblox Creator Documentation is the reference worth bookmarking. It has working examples for exactly this kind of thing, and it's kept current as the platform changes.