Drawing objects

How can I draw for example a cylinder in a cube and both are visible?

draw the cylinder then draw the cube(or vice versa depending on what way you want the colors to turn out. then in your init function use

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);

oh and make sure you use

glColor4f(whatever colors,0.5);
example
glColor4f(0.0f,0.0f,1.0f,0.5f);/*blue*/