Your vocal chords are muscles. Any exercise without proper training can do more damage than good. Singing is no different. Approach singing like you would a workout: warm up, exercise, cool down.
Warm ups usually consist of singing scales to stretch the vocal chords at varying volumes: soft, medium, loud. Additionally, stretch your neck and face by stressing different consonant/vowel sounds: ah, e, eye, oh, you, te, ta, etc.
When you are actually singing, keep a good posture, not hunched over. Places your hands below your belly button and focus on pushing air from your diaphragm. Breathe in through your nose and out of your mouth. This can make all the different when trying to stay on pitch.
A cool down doesn't have to be extensive as the warm up, but usually its a good idea if you need to sing the next day. Sometimes "hooting" from a low volume to a higher volume is all you need.
Another important part is hydration. Drink lots of warm water periodically to keep your vocal chords loose/lubricated. Avoid sugary drinks or milk. Try to stick to plain water, or warm green tea with a little bit of honey.