This is probably something I don't understand since I am used to Windows 
and am only starting out with Ubuntu. I know that software in linux comes in packages what I don't understand is why can't non-admin users install software.

I mean, every application is run by a specific user, and that user will
only be able to run that applciation with his privilages, so if he has
no admin privileges, the application also won't be able to access unauthorized
directories etc.

I want most of the time to work on my PC with a non-admin user since it seems
more safe to me, most of the time I have no need for admin privileges.
and even though I know viruses in linux are uncommon I still think the best
practice is to work on the computer in a state that you yourself can't
make any changes to important files, that way viruses also can't harm any important
files, but I need to install software for programming and web-design etc.
and first of all I don't want to switch users all the time.
But also it sounds safer to me that everything being done on the PC
will be done through the non-admin user.

I'll be glad to know what misunderstanding I have here, cause
something here doesn't sound right.
['https://askubuntu.com/questions/48243', 'https://askubuntu.com', 'https://askubuntu.com/users/19733/']
Non-admin users cannot install software because the packages run as root when they're installing as they install to privileged parts of the system, run maintainer scripts, etc. 

There is currently no way to tell the system "Install firefox from this .deb but in a user's home directory so that it's isolated from the rest of the system"; which is why currently it's mostly an all or nothing affair. (This is also why running third party .debs is bad, the package and it's included scripts have root access to your system)
You can install software as a regular, non-admin, user. Software installed by a regular user will be "owned" by that user, which means that, in effect, it is an extension of the user -- it has no more permissions than the owning user does, though it may have fewer permissions, at the user's option.

A common practice is for a user to create a 'bin' directory within their home directory. If /home/[user]/bin exists, it is added to the beginning of that user's path. You can place executable files in /home/[user]/bin, or in any other folder to which you have write and execute access, and execute the program from there.

What a regular user can't do is install a package system-wide. A regular user can't put executable files in /usr/bin, for instance, nor grant them permissions that exceed the user's own permissions. This is, obviously, for basic security reasons -- you need admin permissions to reformat a hard drive, for instance, and you don't want someone unauthorized doing that.

As far as I know, you cannot use package management software to install a software package unless you have admin permissions, as package management is done system-wide.

However, without admin permissions, you can create shell scripts, write and compile source code, download and compile "tarballs", which are packages of source code for complex applications, or download executable files, so long as these can be used with only the permissions of a regular user. Some indie games, such as World of Goo or X-Plane 9, can be installed and used in this way.