They are terms of endearment. If you love someone (or something) like a boyfriend, husband, son, daughter or even your pet cat you can say a term of endearment. If you call someone a term of endearment and they aren't someone close to you personally then you might come across as quite flirty.