That's not to say books and classes aren't useful. I took a stand-up comedy class when I first moved to Los Angeles and it did great things for my confidence. But no one goes into a comedy class as an unfunny person and just magically learns how to identify the quality punchlines hiding in all of those depressing stories about natural disasters and dead people that we read every day. It's just not something everybody can do. To suggest otherwise is like implying that anyone with access to a basketball can play in the NBA, provided playing professional basketball took way less talent and paid fast food money.
Not even name brand fast food.
So that's the bad news. The good news is that being funny is something a lot of people can do. And you could very well be one of those people! The only way to find out is to try it. You can't wait for the right book or class to come along and explain how to be funny. You should already know if you are to some degree. Or at the very least, you should be delusional enough to think you are when you really aren't. Either way, there's only one way to find out for sure, and that's by giving it a shot. If you want to write Internet comedy, my personal suggestion would be to start here like I did. If you want to do stand-up, go to an open mic night and tell some jokes. See what happens from there. It's as easy as that, minus the easy part. That brings us to the next point.