For this, one needs to understand the relation between a Lie Algebra and a Lie group. A Lie algebra, as conceptualized by Sophus Lie himself, are those group members "infinitesimally close" to the identity element of the Lie group. Perhaps in more sophisticated/rigorous terms, the Lie Algebra is the tangent space of the identity element, with the Lie bracket being the matrix commutator for matrix Lie groups (which are the largest class of Lie groups, let's not worry about the exceptional groups for now).
This should tell you that two groups will have the same Lie algebra if their neighborhoods of the identity are the same. In other words, near the identity of two Lie groups which share a Lie algebra (say SO(3) and SU(2)), the two Lie groups look identical. It is the global topology of these groups that differentiate between them. In our example, SU(2), which is isomorphic to the three-sphere, forms a double covering of SO(3) with radially opposite points on the three sphere identified. Also SO(3) is not simple, nor simply connected, where SU(2) is both. Notice though that because SO(3) is SU(2) with antipodal points identified, its neighborhood of the identity (which cannot see the global structure of the group) is the same as SU(2). This has nothing to do with the space upon which they act (which is called a realization, or representation of the group).