For Static Data.
1.Create an ArrayList.
List lmonth=new ArrayList();
2.Populate arraylist.
lmonth.add("0");lmonth.add("1");lmonth.add("2");lmonth.add("3");lmonth.add("4");lmonth.add("5");lmonth.add("6");lmonth.add("7");lmonth.add("8");lmonth.add("9");
        lmonth.add("10");lmonth.add("11");
3.Creation of Adapter and adding list to Adapter.
ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, lmonth);
        dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
4.Set Adapter to spinner.
 Spinner month=(Spinner)findViewById(R.id.spinnermonth);
month.setAdapter(dataAdapters);
This is way of populating a spinner with static data..
For Dynamic data.
1.Create an Adapter.
public class SpinnerCustomAdapter extends BaseAdapter {
    private Context mContext;
    private List<JobSearchModel> mList=new ArrayList<JobSearchModel>();
    private LayoutInflater mLayoutInflater;
    private String mType=null;
    public SpinnerCustomAdapter(Context mContext, List<JobSearchModel> list) {
        this.mContext=mContext;
        this.mList=list;
    }
    @Override
    public int getCount() {
        return mList.size();
    }
    @Override
    public Object getItem(int i) {
        return i;
    }
    @Override
    public long getItemId(int i) {
        return i;
    }
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder=null;
        LayoutInflater layoutInflater=(LayoutInflater)mContext.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
        if(convertView==null){
            convertView = layoutInflater.inflate(R.layout.layout_spinner, null);
            holder = new ViewHolder();
            holder.textView2=(TextView)convertView.findViewById(R.id.txt_text2);
            convertView.setTag(holder);
        }
        else {
            holder = (ViewHolder) convertView.getTag();
        }
        JobSearchModel classModel=mList.get(position);
        String id = mList.get(position).getId();
        if(id.equals("select")){
            holder.textView2.setTextColor(mContext.getResources().getColor(R.color.lightblack));
        }else{
            holder.textView2.setTextColor(mContext.getResources().getColor(R.color.black));
        }
        holder.textView2.setText(classModel.getDescription());
        return convertView;
    }
    static class ViewHolder{
        TextView textView2;
    }
}
The XML needed for the Adapter is 
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <TextView
        android:id="@+id/txt_text2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Dami"
        android:textSize="14sp"
   android:layout_marginLeft="5dp"
        android:textColor="#4E4E4E"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp"
        />
    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        />
</LinearLayout>
3.Now create a Model class according to the needs.
public class Model {
    private String id;
    private String description;
    public char[] name;
    public Model()
    {
    }
    public Model (String id, String description) {
        this.id = id;
        this.description = description;
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append(String.format("%02d", id)).append(" - ").append(description);
        return sb.toString();
    }
}
4.Now inside The Main class.
i)Create the Arayylist.
  private List<Model> mList = new ArrayList<Model>();
ii)Initialize and define spinner.
Spinner loc = (Spinner) findViewById(R.id.sp_loc);
iii)Set OnItemSelectedListener for Spinner.
loc.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
            }
            @Override
            public void onNothingSelected(AdapterView<?> adapterView) {
            }
        });
Now populating the spinner with dynamic data.
eg: code shall be given below.
private void Parsing(JsonParser jsonParser) {
    Log.i(">>>ClassResponseloc", "" + jsonParser);
    mList = new ArrayList<Model>();
    Model classModel = null;
    try {
        while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
            classModel = new JobSearchModel();
            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = jsonParser.getCurrentName();
                if ("id".equals(fieldName)) {
                    jsonParser.nextToken();
                    classModel.setId((jsonParser.getText()) + "-");
                } else if ("name".equals(fieldName)) {
                    jsonParser.nextToken();
                    classModel.setDescription(jsonParser.getText());
                }
            }
            mList.add(classModel);
        }
        SpinnerCustomAdapter adapter = new SpinnerCustomAdapter(this, mList);
        loc.setAdapter(adapter);
    } catch (JsonParseException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
It might help u.