First this is a /give command format, ] is optional.
/give <Player> <Item> [Amount] [Data] [Datatag]
Item means this ID of that item (e.g. minecraft:command_block, minecraft:diamond_sword).
Amount is how much you want this item, max 64.
Data aka the Damage Value. For most items it is used to determine its type (e.g. Granite, Red Wool), for tools, it determines how much durability is used on that item.
Datatag is something complex, so i will write most used types of Datatags below.
Red is where you can change the value.
Green ... means that you can add more, use comma "," to split multiple different commands.
Unbreakable
Makes the item unbreakable, meaning that it would never loses its durability.
Usage: Unbreakable:0/1
ench
Add varies of enchantments on that item.
Usage: ench:[{id:ID of enchantment,lvl:Enchantment level}...]
HideFlags
Hide attributes on that item. Hide enchantment ID is 1, hide modifiers ID is 2, Hide Unbreakable ID is 4, hide CanDestroy ID is 8, hide CanPlaceOn ID is 16, hide other flags ID is 32. Add the IDs together if you want to hide multiple flags.
Usage: HideFlags:1-32
CanPlaceOn
Allows your item to be only placed on certain blocks in Adventure Mode.
Usage: CanPlaceOn:["minecraft:Item ID"...]
CanDestory
Allows your item to only break certain blocks in Adventure Mode.
Usage: CanDestroy:["minecraft:Item ID"...]
[font=arial]Congratulations! You had learned the basics about the /give command![/font]
Next Tutorial: Item AttributeModifiers
Cool commands (15w31c+):
/give @p minecraft:diamond_sword 1 0 {HideFlags:5,Unbreakable:1,ench:[{id:51,lvl:1}],AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:10,Operation:0,UUIDMost:23544,UUIDLeast:138008},{AttributeName:"generic.attackSpeed",Name:"generic.attackSpeed",Amount:-1,Operation:0,UUIDMost:92487,UUIDLeast:177601}],Unbreakable:1}
/give @p minecraft:bow 1 0 {ench:[{id:48,lvl:10},{id:51,lvl:1}],AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:2,Operation:0,UUIDMost:78101,UUIDLeast:172119},{AttributeName:"generic.attackSpeed",Name:"generic.attackSpeed",Amount:-1.5,Operation:0,UUIDMost:93084,UUIDLeast:166280}],Unbreakable:1,HideFlags:5}