It is important that your bass is always in tune, partly because it sounds much better, but also because you initially have to learn to hear the proper intervals between tones. If you need to play with others or play with the Soundslice player on this site, it requires that your bass is in tune. For this we use a tuner.
If you do not already have a tuner, you should go and buy one. If you have a pedal board, it is most likely that you have a tuner build inside it. Otherwise, you can use a tuner by searching the web. When you hit a string the tuner will show which tone it produces. Now Adjust the tuning peg so the tone matches the string name.
The bass will stay in tune better if you tune up to the specific tone, rather than down. This means that when you tune, make sure that the tone of the string you are tuning is lower than the tone you want to obtain, so you gradually can tune up to you hit the exact tone.
New strings have a tendency to expand, thereby often go out of tune. Depending on how much you play, this may continue for longer or shorter periods. One thing you can do to fasten the process, is to stretch the strings themselves when they are applied to the bass. Grasp each string around 12. fret and pull and drag thoroughly in each string. Now tune the strings again and do it all over again until the strings stay in tune.