Not all mammals lay eggs! Most mammals give birth to live young, but there are a few species that are called monotremes who lay eggs. These are the echidnas and the platypuses.
Here's where they lay their eggs:
Echidnas dig burrows in the ground and lay a single egg in a pouch on their belly.
Platypuses dig burrows near water and lay one to three eggs in a nest of leaves and vegetation.
Let me know if you have any other questions about mammals!