How add primitives or other objects to scene using python
There are several operators that add primitive objects to a scene, look at the reference for each to see all available options.

An example of adding several objects -

import bpy

for x in range(10):
    bpy.ops.mesh.primitive_cone_add(location=(x,0.0,1.0), radius1=0.5, radius2=0.1)
    bpy.ops.mesh.primitive_cube_add(location=(x,0.0,2.0), radius=0.5)
    bpy.ops.mesh.primitive_ico_sphere_add(location=(x,0.0,3.0), size=0.5)
    bpy.ops.mesh.primitive_monkey_add(location=(x,0.0,4.0), radius=0.5)


You can also find similar operators available when using bmesh, which is a better option when you want to edit mesh objects, or build more complex models.

Note that after you add an object using one of the primitive operators, it becomes the active object, that means you can get the object using bpy.context.active_object and make further adjustments after you have created it.

This answer gives an example of creating multiple materials and assigning them to different faces.