Domain structure and magnetic pinning in ferromagnetic/superconducting hybrids