You need to do the research, and decide how sophisticated you want the system to be. Here are a couple of suggestions, just search the products on "X10.com".
Motion sensing can be done with motions sensors such as MS16A. The MS16A transmits by radio, motion detection to an interface which puts the signal on the homes powerlines You need to decide if you want any kind of intelligence to govern how the fan and light are controlled by motion. For example does motion simply turn on fan and light and lack of motions turns them off? If so the interface could be a simple TM751A.
If you want intelligent i.e. "Home Automation" (example: motion turns on fan anytime, but lights only in the evening) then a computer interface is needed such as CM15A and Active Home Pro software.
The Interfaces that receive the powerline signals and actually apply power to lights and appliances are "Lamp Modules", "Appliance Modules" and "Wall Switches". Lamp Modules such as LM465 control dimable incandescent and some dimable CFL lights only. Appliance Modules such as AM486 controls non dimable appliances such as fans, fluorescent lights, etc. Wall switches such as WS12A control dimable incandescent light and WS13A control fans, fluorescent lights, receptacles, etc.
This can get as big and as complex as you want.
good luck