Strings start to wear out from the moment you put them on your instrument. They can wear out in a variety of ways: Their tone deteriorates over time. They will eventually go "false," which means their pitch will not be accurate, even if you tune them properly, or they will vibrate to two pitches at once! Violin E-strings go false faster than other strings. The metal winding on strings will also eventually break and unravel, which will hurt your fingers and scratch your fingerboard if you continue to use such a string.
If you play an average amount - meaning YOPW, your school orchestra, daily practice, and maybe also a private lesson each week - a good rule of thumb for violinists is to change your strings once every six months. Violinists should change their E-strings once every three months. The strings on larger stringed instrument generally last longer than violin strings, but should also be replaced at slightly longer intervals. A good general purpose string for violins, violas, and cellos is a synthetic, perlon-core string, such as the Thomastik Dominant, which is relatively inexpensive and widely available. Your teachers may have some other suggestions for you.
Basses should expect to change their strings about once a year. A good time to do this is in August, so you have a fresh set of strings when school and YOPW start up. Good options are the Thomastik Spirocore weich string -- which has a steel spiral core and provides good results for both bowed and pizzicato playing-- and the D'Addario Orchestra medium gauge, which provides a quick response for bowed playing. Your teacher may have some other suggestions, as well.
With a little care, anyone can mount a string properly. First, apply a little pencil lead to the grooves in the bridge and in the nut next to the peg box. This deposits a little graphite to lubricate these contact points. Then attach the string securely to the tailpiece or fine tuner attached to the tailpiece. Thread the string through the hole in the peg, extending the string far enough through the peg to fold down over the shank of the peg, but not so long that the end touches the peg box. Make sure to fold the end of the string, so that it faces the knob of the peg. Then begin to wind the string onto the peg by turning the peg away from you. Carefully wrap the string evenly over the extended end, from the center of the peg box toward the knob of the peg, making sure that the string does not touch the actual edge of the peg box. When you are finished mounting your strings, your bridge may have been tilted towards the scroll of the instrument. Grasp the top edges of the bridge between your thumb and forefinger on each side, placing the heels of your hands against the instrument, and carefully pull the bridge vertical again. If you have never done this before, please ask your teacher or a coach to show you how.
Change only one string at a time. If you take all your strings off at the same time, the sound post inside your instrument may fall, and it will also be difficult to get your bridge into the proper alignment. If your sound post falls, you will have to take your instrument to a violin shop to have it reseated, before you can tighten your strings. It is easy to avoid this problem by changing only one string at a time.
Basses have a winding mechanism, which makes the procedure a little more complicated, but the same general rules apply to changing your strings. If you are uncomfortable changing your bass strings, please ask your teacher or a luthier to do the work and/or show you how it's done.