This can be a somewhat complicated process, to draw shadows in perspective. There are many great resources, but I'll show a simple demo here.
This is using a single light source and a simple box form.

Here are the construction steps I used to create that final image:
- Lay down your horizon line and choose your vanishing points (VP).
- Draw your shape (here the blue box) in perspective. Use standard perspective technique, connecting points on your shape to the relevant VP. Make sure you draw the hidden part of the object (the back), because that can affect the shadow shape.
- Assign a place for your Light Source. This is up to up. The horizontal distance from your object will determine the rotation of the shadow. The vertical distance from the horizon will affect the length of the shadow, with greater distance shortening shadows (just like at high noon).
- From your light source, draw Shadow Perspective Lines to the top vertex points of your shape.
- From your Horizon Light Point (AKA light vanishing point) draw the Shadow Perspective Lines connecting to the bottom points corresponding to the points from step 4.
- Find the intersection of the SPLs from vertexes connected by common edges.
- Connect these SPL intersections. They are the boundaries of your shadow.
- Connect the remaning SPL intersections to the ground-level vertex of the object by following your SPL to the horizon light vanishing point. (Usually, you don't have to think about it and just connected it to the logical corner.)
- Shade in between those boundaries you just made.
Things get more complicated as your shape gets more complicated, is not resting on the ground, or has curves. The guide I linked to earlier has information on casting shadows from the air, and onto other objects instead of the ground.
You can cast shadows of curved objects by creating a shadow map of the box you could draw around your perspective object. The Virtual Instructor has some examples of shadows of circular and spherical objects.
For more information, you'll want to find resources regarding drawing in perspective, and especially shadows in perspective.
Multiple light sources and ambient light will further complicate your drawing. Getting this done correctly may be less a matter of calculation and more a case for studying how shadows work in the real world. Observation and reference will be your best friend there, especially as you learn about how light and shade works.