As @JdeBP said, you have not clarified what exactly you did. However, the answer to your questions may lie in the man page:
man shutdown
Which tells us,
shutdown may be used to halt, power-off or reboot the machine.
So for your questions,
I am having problems shutting down and restarting the computer
It does not power off
to reboot, you should run (if you didn't already),
shutdown -r
and if you're trying to power off,
shutdown -P
Also, have a look at this question which mentions the exact thing you do: https://askubuntu.com/questions/632591/system-does-not-power-off-on-poweroff-just-halts
And this question talks more about the commands halt
and shutdown
:
https://askubuntu.com/questions/73696/what-is-the-proper-terminal-way-to-shutdown
Reached target shutdown
and halts! – Mukesh Aryal Jul 23 '18 at 15:21