つまらない is a verdict on something. A film, a class, a party, a book: it did not come together, so there is nothing in it. English lets you aim “boring” both ways — a boring lecture, and “I'm so bored” — and Japanese does not. つまらない人 can describe a boring person, but 私はつまらない does not mean “I am bored.”
退屈 is the state; つまらない is the evaluation. 退屈だ can be either “I am bored” or “it is boring”, and whatever the sentence marks as its subject decides which. So 私は退屈だ is I am bored — and 私はつまらない is I am a boring person, which is a sentence learners produce constantly and never mean. If you are bored, say 退屈だ, or name the thing: この授業はつまらない.
The second sense has nothing to do with boredom. つまらない also means trivial, not worth the space it takes up — つまらないことで喧嘩する to fight over nothing, つまらないミス a silly mistake, つまらない理由 a flimsy reason. Before a noun this is usually the reading. くだらない is its harsher cousin: worthless, and openly contemptuous.
つまらないものですが is not an insult to your own gift. It is the standard line for handing something over — “it's nothing much, but please” — and the modesty is the whole point. Younger speakers increasingly find it odd and reach for 心ばかりの品ですが or simply よかったらどうぞ, but you will still hear the original constantly, especially anywhere formal. Casual speech contracts the word instead: つまんない everywhere, つまらん in blunter registers — neither of which you write down.