Do you have enough magicka for the spell you are trying to cast ?
Suggestions.....
1) Start with the basic (first tier, novice)flame, frost or lightning spells, these spells are constant cast meaning that they should use low mana and be cast as long as you hold the mouse button. What you should see is (with fire for an example) is a spray of flames from one hand if you have it equiped on a single hand and press the mouse button for that hand. So put flames on right hand, then press right mouse button and hold, and see if you get a steady shot of flames and your mana decreasing. If you see a steady spout then the mouse and all seems to be working correctly. If not then you have to figure out why, and more details about what is going on will be needed.
2) Make sure you have enough mana to cast the spell like Falmark said, by checking on the spells page for how much it costs to cast and then your character mana level. If you don't have enough you should see the mana bar flash when you try to cast.
3) Make sure you are holding the button for the correct hand long enough to cast the spell. Most spells take a few seconds to "powerup" enough to cast, and you can usually watch your mana bar decrease to a point then it will hold once you are ready to cast the spell. Once you are ready to cast the spell, release the button to cast the spell, if you release before the spell is fully powered, then it will not cast.
4) silliest thing to check...make sure you have equipped the spell to the hand you are trying to cast it from....hotkeys usually equip one hand with one press then the second hand with a second press, so make sure you have the spell on the correct hand for the try.....and this is probably a total waste of time, but hey, I have had silly things like this trip me up too many times in games not to mention.
I have a similar problem on ps4. Sometimes it helps to sheath weapons/ hands and pull them out again, open the menu or mash some buttons usually unsticks it for me. There's usually something that triggers it like coming off an ore vein or out of a forced dialogue or some kind of transformation maybe. Similar to being stuck in sneak mode when it says you're walking. Usually won't even let me charge it up though just doesn't do anything.