You first need to check whether everyone is okay. Then, call 911 if you need emergency services and get everyone to safety.
Exchange information with the driver and document the scene. Note the driver's name, license plate number, employer, insurance company, policy number, etc. If possible, take pictures of the scene.
After the accident, contact a personal injury lawyer or firm. They can help you build a case and receive compensation.