It can be hacked yes, in fact the vast majority of server hacks are linux related simply because it's one of the most popular server based operating systems. Linux however does tend to be more secure than Windows for end users, especailly if users enact security policies such as not using the Root login, among others. No operating system is impervious to possible exploitation, developers can only try the best they can to prevent exploitation and quickly patch the exploit as soon as it's discovered. Bugs in Linux tend to be a bit more easy to find due to the fact that tens of thousands of people are continually going over the kernal source code and fixing or suggesting possible fixes.