Put the note on a pencil (like on the thing you can use it to clip onto something) then drop the pencil and ask your friend to pick it up. Ive only been caught once doing that and my teacher thought it was unique so he didn't punish me. just realize somebody else already said that.... kinda. or you could throw it when he's not looking.
When the teacher looks away/turns his back on the students, or is at his desk, also keep acting like you dropped your pencil and go down to pick it up (but pick up/hand the note to the other person) also you can look this up on the Internet I'm sure they have more than this hope I helped
When I pass notes to my boyfriend in class I tap his back with my foot (because his desk is in front of mine) and then he puts his hand thats farthest away from the teacher back behind his seat and I hand it off to him then when he passes back he just drops it under my desk and I act like I am getting some thing from my bag and grab it off the floor it's a little complicated but there are less then 10 kids in my class and my teacher watches are every move she freaks me out a bit lol