The fast answer is it depends. If you want to add functionality that Magento has accounte for, such as a new payment method, it's not difficult to extend Magento. There are simple hooks specified in XML that will allow you to manipulate those kinds of things.
When it comes to adding new functionality, it may also be simple. Creating a new controller and displaying templates you create for pages is not too difficult once you get the hang of the framework.
There are two places, though, where you are likely to get into trouble programming for Magento. The first is when you are trying to modify core behavior of the system. Trying to put additional data on items in the shopping cart, for instance, is not a simple thing to do, or creating bundles of products on the fly. It's almost impossible to estimate these tasks as seemingly unrelated parts of the framework come into play only after you've hacked things into place.
The second place is where you have to modify very core sections of Magento code (there's a difference between this and the above, I promise). The crux of the issue is that all the "clean" ways of modifying code to fit your needs fail when you try to modify something very fundamental in Magento, and the dirty ways will result in huge headaches down the road (e.g. you cannot cleanly upgrade your site).
That's a simplification of the situation, but from what I gather it's the opinion of many other Magento coders as well. Hope that helps! Joe