You can enter Germany with your Ukrainian passport or your Ukrainian ID card (2015 model). You do not need a ticket for this.
If you want to use public transport (S-Bahn, RB, RE, U-Bahn, tram, bus), you need to buy a regular ticket.
If you want to travel on long-distance trains of Deutsche Bahn, you need the free "helpukraine" ticket. The long-distance trains are marked with EC, ICE or IC. You can get the ticket in the reception centres and emergency shelters or also online as a so-called "eToken".