What does the Bible mean by "sin" exactly?
In Scripture what is sin is not a matter of human opinion, but rooted in the very nature of God, who is holy and unchanging. God also sees the hidden pitfalls we may not see. Proverbs 14:12 says, "There is a way that seems right to man, but its end is the way to death."
In the New Testament the word for "sin" means to fall away from or to miss the right path.
So "sin" is anything in us that runs contrary to the nature and will of God. Even when we wrong others or ourself, ultimately it's because it's against God that makes it sin.
Jesus said that loving God and our neighbor as ourself summarized the law of God (Matthew 22:38-40). Consequently, sin always involves selfishness, putting self first before God or others. Either one is sin.
There is no "victimless" sin, because even when we can't see the damage it causes, or the offense to God's nature, it still has it's impact sooner or later on us. And that means that we ourselves aren't the blessing to others we were meant to be.
More on this topic....
Why the law?
The law of God in the Bible, the Ten Commandments and other laws, can't actually make us sinless--because no one can possibly keep it perfectly. In fact, it's purpose was to help point out sin, and the need for forgiveness in Christ:
"Therefore no one will be declared righteous in God’s sight by the works of the law; rather, through the law we become conscious of our sin" (Romans 3:20)
Thankfully God, in love, gave us Christ as the payment for our sin.