Actually they are the same:D
But critically, “二” is usually used in writtrn language, which, “两”, can be used in both situations.
E.g: You can write “I have 两个 apples" or "I have 二个 apples". But when speaking, most native speakers may say “I have 两个 apples". Also you can just replace them with number "2". It's still common.
Am I clear? Should you have any questions, just feel free to ask me. ^ ^