Ceiling fan & lights turn on automatically
It sounds like you have a hot wire that is bypassing the wall switch. Be very careful because you make think you have a dead circuit when you actually have a live one. Make sure you are using a circuit tester before you grab a wire. 

You are going to have to determine that you have both the black (hot) and the White (neutral) wires that are actually connected to the light switch. You can do this fairly easily if you have a multi meter. First, make sure you gave opened the circuit breaker and test for voltage at the switch. Once you determine that you have no electricity to the switch disconnect the black and white wire that leads to the çeiling box.  from the switch. Connect these 2 ends together using a wire nut. Then take your multi meter to the ceiling box and set it to measure ohms resistance. Touch one lead to the black wire and the other lead to the White. You should get a reading of almost 0. If you get a reading off scale high then one of those wires does not go directly to the switch.
 - List item

then