CREATING A CONFIGURABLE PRODUCT IN MAGENTO

from this tutorial you'll find how to create a configurable product in magento

Configurable Products let your customers select the variant they desire by choosing options. For example, you sell t-shirts in 2 colors and 3 sizes. So, you'd create the 6 variants as individual products (with their own skus) and then add these six to a configurable product from where your customers can choose size and color, then add to cart.
Steps in configurable product:
1. Create the attributes that will be configurable by the user - we will use our example, so our attributes are color and size
First, we set up the configurable attribute size
Attribute Properties:
Magento attribute properties
The attribute configuration must be:
Catalog Input Type - dropdown
Scope - Global
Use to create configurable product - Yes
Required - Yes

Labels/Options
Magento attribute labels or options

The attribute "Color" will be set up exactly the same, with only the Labels/Options page changed:
Magento attribute labels or options for color

2. Create the attribute set that will be assigned to the variant products - for our example, will name it "T-shirt"
Now we will create an attribut set called "T-shirt" to start using for this product.
Go to Catalog -> Attributes -> Manage Attribute Sets -> Add New Set
Add new attribute set in Magento
Continue to the next page. Drag the two attributes into a new group; name the group “Selectable Options”:
Magento rename new group

3. Create the individual variant products
Catalog -> Manage Products -> New Product. Create a Simple Product based on the "T-shirt" attribute set:
Magento new simple product
Fill in all the required information, then fill in options for the “Selectable Options” tab, then press "Save product".
Magento new simple product selectable options
Now, you will have to repeat these steps for every combination of options your product will contain. After you're done you should have a product list similar to this one:
Magento products list example

4. Create the configurable product, and add the "T-shirt" attribute set
Catalog -> Manage Products -> New Product. Select Configurable based on the T-shirt attribute set:
create product settings in magento
The next screen lets you pick which attributes you want to associate. Select both Size and Color and press Continue. The next page is the regular create product page, with the addition of the “Associated Products” tab at the bottom. The general tab used for the sample product looks like this:
Magento create product page general

5. Add the individual variants to this configurable product
Look at "Associated Product" tab. You have the possibility to select which simple products will be associated to the current configurable product. Also, you have the possibility to set different prices from the current price of the configurable product.
Magento associated products
You're done!