If I jailbreak my iPhone, will Apple know?

I was wondering if I jailbroke my iPhone 4, would apple and verizon both know i did it? Would they always know i did even after restoring it? Also would they do anything to me because i jailbroke my iPhone?

Jail breaking is not illegal, so they wouldn't be able to do anything to you for it. The only way they'd find out is if they looked at your phone, so you'd have to show them for them to know. However, if your phone breaks after being jailbroken, it can't be fixed by apple for free (in some cases they'll refuse to fix it completely).

Restoring doesn't get rid of all jailbreak files.
your warranty will be void and apple will not fix or replace