Most people can make their friends or coworkers laugh. It's a lot harder to make strangers laugh, and it's even harder to make comedians laugh. Your first audience will probably be a crowd of sober comedians who've seen a hundred people just like you perform the same tired material you're about to try. If you're naturally likable and energetic you may get some laughs, but eventually you need to be funny on demand.
One time after I bombed an open mic, my comic friend told me "It's ok, you just don't know what's funny yet." To be funny, you need to know what you believe to be true, what other people believe to be true, and how you can twist those truths to make people laugh. Hannah Gadsby said that laugher is a mechanical response to tension release. Great comedians look at language, society, and communication on a very deep level. It's why The Daily Show with and Last Week Tonight are more informed and accurate than anything Fox or CNN can produce. Writing humor is hard work, but there are definitely formulas, structures, and patterns that help.
Jokes can be one-liners, puns, wordplay, story telling, imitation, self-deprecation, dark. Every premise has been explored: sex, drugs, waterparks, etc, but there are new punchlines written every day. It's hard to define comedy, but you know it when you see it. George Carlin said: "Comedy’s all about comparisons and contrasts and congruities and incongruities and heightenings and understatement and exaggeration."