If you know a cantrip, you can cast it - even if you don't have a Spellcasting class feature
As the basic rules describes cantrips:
A cantrip is a spell that can be cast at will, without using a spell slot and without being prepared in advance. Repeated practice has fixed the spell in the caster's mind and infused the caster with the magic needed to produce the effect over and over. A cantrip's spell level is 0.
The rules don't specify anywhere that you must have levels in a spellcasting class to cast cantrips. You don't need to use or even have spell slots in order to cast a cantrip. If you know a cantrip - no matter how you know it - you can use it at will. There are lots of ways to know cantrips, as many races have knowing a cantrip as one of their basic features, and they can be learned in play by using feats like Magic Initiate.
It is possible to cast levelled spells without the Spellcasting feature if you have another feature that lets you do so
Many racial and class features also allow you to cast "proper" spells without being a spellcasting class and without using spell slots, as the magic rules describe:
Some characters and monsters have special abilities that let them cast spells without using spell slots. For example, a monk who follows the Way of the Four Elements, a warlock who chooses certain eldritch invocations, and a pit fiend from the Nine Hells can all cast spells in such a way.
One such way is to be a Tiefling, as your character is! The Tiefling's Infernal Legacy racial trait:
Infernal Legacy. You know the thaumaturgy cantrip. When you reach 3rd level, you can cast the hellish rebuke spell as a 2nd-level spell once with this trait and regain the ability to do so when you finish a long rest. When you reach 5th level, you can cast the darkness spell once with this trait and regain the ability to do so when you finish a long rest. Charisma is your spellcasting ability for these spells.
As you gain levels, this feature lets you cast the spells hellish rebuke and darkness without needing to have or use spell slots - though with the restriction that you can only do so a limited number of times between rests. What is important to note is that you don't "learn" or "know" these levelled spells - so even if you are a spellcasting class, you can't use spell slots for these spells (unless you have learned them properly from another source).