@ZachSaucier suggested old posts that address your issue. But if they still don't help you, a custom Scatter Brush will do the trick in just a few minutes. Here are a few steps on how to.
- Draw your desired star on the artboard
- Open the Brushes pane by pressing F5
- Drag your star onto the Brushes panel. (A dialog window will pop up, and please make sure you have selected Scatter Brush second option as of Illustrator CC), and click okay.
- Another option dialog dialog Scatter Brush Options will popup. Name your brush, and make sure the Size, Spacing, Scatter, and Rotation are set to Random (depending on what aspects you wish to randomize)
- You can hide the star, and draw a random path/Pen Tool on the art board make sure it has no fill but just the stroke.
- You can now select your custom brush from the panel with the path still selected
NOTE: To play around with the randomness, you can always double click on your custom brush to open its options, adjust the sliders and make sure preview is checked. Adjusting the shape of your path also helps a lot. For best effects of the overflow starts, you can create a clipping mask to hide them.
Other cool customization, Colorization/Tints and Rotation Relative to Path/Page.
Hope this helps.